Skip to main content
Glama

Crypto, web, finance and app data tools

Text Diff

text_diff

Compare two texts line by line: unified diff, list of added, removed and changed lines, line and character similarity, optionally ignoring whitespace and case. Use to compare documents, configs or model outputs.

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
aYes
bYes
contextNo
ignore_caseNo
ignore_whitespaceNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the disclosure burden, and it does reveal the output shape (diff plus similarity metrics) and the two comparison modes (ignoring whitespace/case). It does not address limits such as input size, performance, or what happens on large inputs, so it is adequate but not rich.

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

Conciseness4/5

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

Two sentences, front-loaded with the core comparison behavior followed by use cases. Efficient with little waste, though the enumerated output list is slightly dense.

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?

An output schema exists, so return values need not be fully spelled out, and the description still previews them helpfully. The main shortfall is the unexplained 'context' parameter and lack of any size/limit guidance for a text-processing tool.

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% across 5 parameters, so the description must compensate. It explains the two ignore_* flags reasonably and a/b are self-evident, but the 'context' parameter (number of surrounding diff lines) is never mentioned and remains ambiguous.

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 (compare) and resource (two texts) and enumerates what the tool actually produces: unified diff, added/removed/changed lines, similarity scores. This clearly distinguishes it from siblings like text_stats or text_sentiment, which share the text-processing domain but produce different outputs.

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

Usage Guidelines4/5

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

The final clause gives concrete use cases (documents, configs, model outputs), which sets clear context for when to reach for it. It stops short of naming exclusions or alternatives among siblings, so it is not a full when/when-not statement.

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