An open source implementation of the Claude built-in text editor tool
Single-tool server with a well-structured parameter schema and clear registration. The tool name 'text_editor' is generic and does not start with a verb (pattern violation). The description is adequate (125 chars, within 10-1024 range) but lacks clarity on when to use it vs alternatives and does not explicitly state it modifies state. Parameters are well-typed with Zod schema and descriptions present for all fields. However, the tool exhibits a composition anti-pattern: it conflates 5 different operations (view, create, str_replace, insert, undo_edit) into a single tool via enum, which forces the LLM to reason about which command applies rather than selecting from distinct tools. Output schema is defined but not visible in the provided code snippet (only schema objects declared, not actual response structure). Error handling appears minimal, no evidence of recovery guidance or actionable error messages in the implementation.
View, create, and edit files with persistent state across command calls. This tool is identical with Claude's built in text editor tool called text_editor_20241022
Tool name 'text_editor' does not start with action verb. Per pattern:tool and production baselines, 90% of A+ tools start with a verb (get_, create_, update_, delete_, search_). This tool should be named 'edit_file' or split into verb_noun tools like 'view_file', 'create_file', 'replace_text'.
Tool combines 5 distinct operations (view, create, str_replace, insert, undo_edit) into a single tool via enum command parameter. Pattern:tool requires each tool to do exactly one thing. This forces the LLM to reason about which command to invoke rather than selecting among purpose-built tools. Should split into edit_file, view_file, create_file, undo_edit_file.
Description does not state that the tool modifies state (creates, updates files). Per pattern:command-tool, tools that modify state must explicitly say so so agents know which calls are retryable. Current description lacks this critical information.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 56 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 43 | - | v1 |
Output schema is declared in code (returnSchema with success, message, content fields) but not documented in tool registration or accessible to the LLM. Per pattern:tool, LLMs must know what fields to expect in responses so they can plan downstream calls and extract data. The schema should be visible in the tool definition or description.
Description does not answer WHEN to use this tool instead of alternatives or provide dependency hints (e.g., 'Use to view file content before editing' or 'Required after create to verify content'). Per pattern:tool-description, descriptions should guide selection and multi-step planning.
No evidence of error handling guidance in code. Per pattern:recovery-guide, error responses must tell the LLM what to do next ('Try viewing the file first', 'Check file permissions'). Current implementation does not show actionable error messages.
Destructive operations (create, str_replace, insert) are not gated behind confirmation or dry-run. Per pattern:confirmation-request, irreversible file modifications should support a confirmation step to prevent catastrophic agent mistakes.