Skip to main content
Glama

UtilVet

Diff two texts

text_diff
Read-onlyIdempotent

Compare two texts line-by-line or word-by-word and return a unified-style diff with counts of added/removed/unchanged and a similarity score.

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": "text_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
aYesOriginal text
bYesNew text
modeNoline (default) or word

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?

Annotations already establish read-only, idempotent, closed-world behavior, so the bar is lower; the description goes beyond them by disclosing what is returned (unified diff, add/remove/unchanged counts, similarity score). It does not mention size limits, truncation, or how large inputs are handled, which is the remaining gap.

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?

One sentence, front-loaded with the action, then the output contract. Every clause earns its place with no filler or repetition of the tool name.

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 no output schema, the description carries the burden of explaining returns and does so by naming the diff format and the three counts plus similarity score. Only edge-case behavior (limits on input size, whitespace handling) is missing, which is minor for a 3-parameter pure function.

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% and the 'mode' property already documents 'line (default) or word', so the description only echoes what the schema says about granularity. It adds no new meaning for a/b beyond 'original' and 'new' already present, so the 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?

The description names a specific verb and resource ('Compare two texts') plus the return shape ('unified-style diff with counts of added/removed/unchanged and a similarity score'). That is far more specific than the title 'Diff two texts' and leaves no ambiguity versus siblings like text_stats.

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?

It implies the choice between granularities ('line-by-line or word-by-word') but never states when to pick one over the other, nor any exclusions or prerequisites. Usage context is implied rather than stated, which lands at minimum-viable.

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