Skip to main content
Glama

diff

Compare two texts line by line. Returns +/- lines with context and the count of added and removed lines.

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>",
      "b": "<b>"
    },
    "name": "diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
aYesOriginal text
bYesChanged text
contextNoUnchanged lines around each change (default 3)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/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 behavioral burden. It does useful work by disclosing the return format (+/- lines, surrounding context, added/removed counts), but it says nothing about input size limits, encoding, binary/line-ending handling, or whether very large inputs are truncated.

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?

Two tight sentences with no filler. Purpose is front-loaded and the return-value detail follows naturally.

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 three-parameter, non-destructive read utility with a fully described schema, this is close to sufficient; the explicit statement of the return format substitutes well for the absent output schema. Only guardrails around input size or failure modes are 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 the parameters a, b, and context (with its default of 3) are already fully documented. The description adds only the loose notion of "context" in the output sentence and does not clarify parameter meaning beyond the schema, so the baseline of 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?

"Compare two texts line by line" states a specific verb (compare) and resource (two texts), and no sibling tool (calc, regex, count_text, check) overlaps with diffing. The second sentence further pins down the exact output shape, so an agent knows precisely what it gets back.

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?

Usage is only implied: the description makes clear it operates on two supplied texts rather than files or URLs, which implicitly routes agents away from check/check_url siblings. There is no explicit statement of when to prefer this tool or any exclusions or prerequisites.

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