Skip to main content
Glama

ToolForte

Text Diff

text_diff
Read-onlyIdempotent

Use this when you need to see exactly which lines changed between two versions of a text. Example prompt: "What changed between these two versions of the contract clause?" Compute an exact line-based diff between two texts with add/remove/unchanged stats. Costs 1 credit. The answer is deterministic.

Input Schema

NameRequiredDescriptionDefault
modifiedYesThe text after the change
originalYesThe text before the change

Output Schema

NameRequiredDescriptionDefault
linesNo
statsNo
resultNoThe result, when it is not an object

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • removedOutput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
  2. Changed3 schema fields changed
    • addedInput schema / properties / modified / description
      Added value: +"The text after the change"
    • addedInput schema / properties / original / description
      Added value: +"The text before the change"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": {},
      +  "properties": {
      +    "lines": {
      +      "items": {},
      +      "type": "array"
      +    },
      +    "result": {
      +      "description": "The result, when it is not an object"
      +    },
      +    "stats": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "added": {
      +          "type": "number"
      +        },
      +        "removed": {
      +          "type": "number"
      +        },
      +        "unchanged": {
      +          "type": "number"
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  3. Changed3 schema fields changed
    • removedInput schema / properties / modified / description
      Removed value: -"The text after the change"
    • removedInput schema / properties / original / description
      Removed value: -"The text before the change"
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "https://json-schema.org/draft/2020-12/schema",
      -  "additionalProperties": {},
      -  "properties": {
      -    "lines": {
      -      "items": {},
      -      "type": "array"
      -    },
      -    "result": {
      -      "description": "The result, when it is not an object"
      -    },
      -    "stats": {
      -      "additionalProperties": {},
      -      "properties": {
      -        "added": {
      -          "type": "number"
      -        },
      -        "removed": {
      -          "type": "number"
      -        },
      -        "unchanged": {
      -          "type": "number"
      -        }
      -      },
      -      "type": "object"
      -    }
      -  },
      -  "type": "object"
      -}New value: +null
  4. Changed3 schema fields changed
    • addedInput schema / properties / modified / description
      Added value: +"The text after the change"
    • addedInput schema / properties / original / description
      Added value: +"The text before the change"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": {},
      +  "properties": {
      +    "lines": {
      +      "items": {},
      +      "type": "array"
      +    },
      +    "result": {
      +      "description": "The result, when it is not an object"
      +    },
      +    "stats": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "added": {
      +          "type": "number"
      +        },
      +        "removed": {
      +          "type": "number"
      +        },
      +        "unchanged": {
      +          "type": "number"
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  5. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive, closed-world), and the description adds genuinely new behavioral facts: it costs 1 credit and the result is deterministic. It does not discuss size limits or truncation behavior at the 100k character boundary, keeping this short of a 5.

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?

Front-loaded trigger sentence followed by a short example, cost, and determinism note — all substantive. The example prompt is somewhat verbose, but it earns its place by showing a realistic invocation.

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

Completeness5/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 no explanation, and the description covers purpose, triggering context, cost, and determinism. For a two-parameter, read-only pure function, nothing an agent needs is 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% and both required parameters are documented there as "text before the change" and "text after the change." The description's "two versions of a text" framing adds only marginal meaning beyond the schema, 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?

States a specific verb and resource: "Compute an exact line-based diff between two texts," and adds scope detail (add/remove/unchanged stats). No sibling tool overlaps with diffing, so the agent can select it unambiguously.

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?

"Use this when you need to see exactly which lines changed between two versions of a text" gives a clear triggering condition, reinforced by a concrete example prompt about a contract clause. It does not name when-not-to-use or a substitute tool, which is the only gap.

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