Structural editing tools for s-expr languages

Resolved 💬 5 comments Opened Jun 9, 2025 by cpsquonk Closed Dec 10, 2025

Claude has excess trouble with editing LISPs' code, since they require keeping parentheses balanced. This results in Claude making an edit, then spending many tool invocations trying to solve imbalanced parentheses. https://github.com/bhauman/clojure-mcp has a tool for replacing s-expr's structurally, which works great, except for it being not exactly production grade, and not integrated with Claude, which results in Claude trying to use clojure-mcp tools on non-LISP files, and Claude taking some convincing to use it via prompting. A replace s-expr tool would be nice to have, and I feel it could generalize well to editing things like config files (deeply nested JSON/YAML especially; Ansible playbooks also have the annoyance of correcting formal syntax via random greps and awk scripts).

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗