Compare two texts line-by-line. Returns structured diff with additions, deletions, unchanged lines, and summary stats.
Single tool 'text_compare_diff' has a well-structured schema with proper types and required fields. Description is comprehensive (380+ chars) and includes use cases, examples, and anti-patterns (when NOT to use). Input parameters (text1, text2) are clearly described. Output schema is documented in the description with example JSON. However, the tool lacks formal output schema definition in the code (only described in text), and there are no tool annotations (readOnlyHint, idempotentHint). The description is verbose but actionable for LLM selection.
Use this when you need to compare two pieces of text and identify exactly what changed between them. Returns a structured line-by-line diff with summary statistics. 1. changes -- array of diff entries, each with type (added, removed, unchanged) and content 2. linesAdded -- total number of new lines in text2 3. linesRemoved -- total number of lines deleted from text1 4. linesUnchanged -- total number of identical lines 5. similarity -- percentage similarity between the two texts (0-100) Example output: {"changes":[{"type":"unchanged","content":"line 1"},{"type":"removed","content":"old line 2"},{"type":"added","content":"new line 2"}],"linesAdded":1,"linesRemoved":1,"linesUnchanged":1,"similarity":66.7} Use this FOR code review (comparing before/after), tracking document revisions, verifying config file changes, or auditing template modifications. Use this BEFORE deploying config changes to understand what differs. Do NOT use for text classification -- use text_classify_content instead. Do NOT use for sentiment analysis -- use text_analyze_sentiment instead. Do NOT use for word counting -- use text_count_words instead.
Output schema not formally defined in code, only documented in description text. LLMs cannot parse unstructured output descriptions reliably.
Tool lacks annotations (readOnlyHint, idempotentHint). 'text_compare_diff' is read-only and idempotent, these should be declared to guide agent planning.
No error handling guidance. What happens if text1 or text2 is null, empty, or extremely large (>10MB)? No recovery hints provided.
Description includes example output JSON inline. LLMs may reuse example values literally. Use formal output schema instead.
Inferred effective spec: 2025-06-18+.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 66 | 2025-06-18+ | v2 |