Part of Epic #270
Objective
Add 6 new file editing tools to existing MCP server, leveraging terraphim-automata for intelligent matching.
Tasks
1. Add File Editing Tools to MCP Server
Location: crates/terraphim_mcp_server/src/lib.rs
Add to existing 17 tools:
- edit_file_search_replace - Using automata strategies
- edit_file_fuzzy - Using fuzzy_autocomplete_search_levenshtein
- edit_file_patch - Apply unified diff
- edit_file_whole - Whole file rewrite
- validate_edit - Pre-edit validation
- lsp_diagnostics - Post-edit validation
2. Leverage Existing Automata Functions
- find_matches → exact search
- fuzzy_autocomplete_search_levenshtein → fuzzy match
- fuzzy_autocomplete_search → Jaro-Winkler match
- replace_matches → base for code replacement
3. Add Block Anchor Matching to Automata
Location: crates/terraphim_automata/src/lib.rs
4. Generate TypeScript Types
- Use existing WASM support
- Generate types for all new tools
Success Criteria
- 6 new MCP tools exposed
- Block anchor matching added
- TypeScript types generated
- Integration tests pass
- Can edit a file using 3+ strategies
Time: 1 week
Part of Epic #270
Objective
Add 6 new file editing tools to existing MCP server, leveraging terraphim-automata for intelligent matching.
Tasks
1. Add File Editing Tools to MCP Server
Location: crates/terraphim_mcp_server/src/lib.rs
Add to existing 17 tools:
2. Leverage Existing Automata Functions
3. Add Block Anchor Matching to Automata
Location: crates/terraphim_automata/src/lib.rs
4. Generate TypeScript Types
Success Criteria
Time: 1 week