Skip to main content
Glama

diff

Compare two texts line by line and return added, removed and unchanged lines with a unified view. Pure CPU, instant. Use to review what changed between two vers

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "a": "<a>"
    },
    "name": "diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
aYesOriginal text
bNoChanged text

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed3 schema fields changed
    • addedInput schema / properties / a
      Added value: +{
      +  "description": "Original text",
      +  "type": "string"
      +}
    • addedInput schema / properties / b
      Added value: +{
      +  "description": "Changed text",
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "a"
      +]
  4. Added

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden; it does disclose that the operation is 'Pure CPU, instant', which usefully tells the agent there are no side effects, network calls, or latency concerns. It does not state that inputs are not modified or describe the exact response structure beyond 'unified view', so gaps remain for an unannotated tool.

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

Conciseness3/5

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

The description is short and front-loads the core purpose, which is good structure. But the final sentence is truncated mid-word ('two vers'), leaving a dangling fragment that wastes space and reads as broken metadata rather than intentional brevity.

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

Completeness4/5

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

For a simple two-parameter pure function with no output schema, the description covers what it does, roughly what it returns, and that it is cheap and side-effect-free. The only real shortfall is the truncated usage sentence and the absence of sibling disambiguation, which are minor for a tool this simple.

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 coverage is 100%, with 'a' documented as 'Original text' and 'b' as 'Changed text', so the baseline is 3. The description adds no meaning beyond that — it does not explain the asymmetry between a and b, what happens when b is omitted (only 'a' is required), or how the line-level comparison treats whitespace.

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

Purpose4/5

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

The first sentence names a specific verb and resource ('Compare two texts line by line') and describes the output shape ('added, removed and unchanged lines with a unified view'), so the operation is unambiguous. However, it never distinguishes itself from close siblings like text_diff, compare, or hash_compare, which an agent could easily pick instead.

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?

'Use to review what changed between two vers...' signals an intended use case, but the sentence is cut off mid-word, so the guidance is incomplete. There is no when-not-to-use guidance and no explicit routing to the overlapping siblings (text_diff, compare, levenshtein), leaving the agent to infer the choice.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources