Skip to main content
Glama
kinbinghua-lgtm

agent-core-mcp

diff_text

Read-onlyIdempotent

Compare two texts line by line with an exact LCS algorithm, returning equal, delete, and insert operations with line numbers and counts. Rejects oversized input instead of hanging.

Instructions

Compute an exact line-by-line diff between two texts using a longest-common-subsequence algorithm. Returns per-line operations (equal/del/ins) with line numbers plus added/removed/unchanged counts. Exact and reproducible; refuses oversized input rather than hanging.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYesThe original text
bYesThe revised text
maxLinesNoCap on returned diff lines (default 2000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly, idempotent and non-destructive, so safety is covered. The description adds a genuinely useful trait beyond them: it refuses oversized input rather than hanging, and describes the per-line operation output plus added/removed/unchanged counts.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences, front-loaded with the core action and algorithm, then output shape, then the oversize failure mode. No filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having no output schema, the description fully specifies return contents (per-line equal/del/ins with line numbers plus counts) and the oversize behavior, so nothing needed to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so a, b and maxLines are fully documented in the schema. The description only restates 'two texts' and the maxLines cap indirectly, adding no syntax or format detail beyond the schema; baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource (compute a line-by-line diff between two texts) and even names the algorithm (LCS), which implicitly distinguishes it from sibling tools like similarity and fuzzy_match that do approximate matching.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or when-not guidance, and no sibling is named. Usage is only implied: exact/reproducible diff contrasts with the fuzzy/approximate siblings, but the agent must infer this.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.