Skip to main content
Glama

Diff text

diff_text
Read-onlyIdempotent

Computes a deterministic line- or word-level diff and returns typed add/remove/equal parts. Use this when an agent needs structured change data. Split highly divergent large documents if the computation limit is reached. Limit: 200k combined characters, 2,000 result parts, 8 ms diff budget.

Input Schema

NameRequiredDescriptionDefault
afterYes
beforeYes
granularityYeslines
ignore_whitespaceYes

Output Schema

NameRequiredDescriptionDefault
okYes
dataYes
metaYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Goes well past the annotations (which already establish read-only and idempotent) by disclosing determinism, three hard limits (200k combined characters, 2,000 result parts, 8 ms budget), and a remediation step for large divergent inputs. This is exactly the kind of constraint an agent cannot infer from structured fields; only the failure mode (what is returned when a limit is hit) is left implicit.

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 sentences, each earning its place: purpose first, then usage, then constraints. No repetition of the title, no filler.

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?

With an output schema present and rich annotations, the description only needs to add constraints and semantics, and it largely does. The one hole is 'ignore_whitespace', which is undocumented everywhere and would change diff results materially.

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 0%, so the description must carry parameter meaning. It covers granularity ('line- or word-level') and reflects the 200k character cap tied to before/after, but never mentions 'ignore_whitespace', leaving one of four required parameters entirely unexplained.

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 and resource ('computes a deterministic line- or word-level diff') and describes the return shape ('typed add/remove/equal parts'). No sibling tool does anything similar, so the purpose is unambiguous even without explicit differentiation.

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 this when an agent needs structured change data' implies the usage context but names no alternative and no exclusion. There are no sibling diff tools to route away from, so the gap is mild, but selection guidance is still only implied rather than stated.

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