Skip to main content
Glama

diff_text

Compare two pasted strings in JSON, YAML, TOML, CSV, .env, or INI to get semantic differences and verified patches; specify the format because no filename is available.

Instructions

Semantic diff of two pasted strings (same output and options as diff_files).

Use this for content that is not on disk. 'format' is required because it cannot be guessed from a name. Both strings must be in the same format. See diff_files for the output shape and for array_match, array_keys, ignore, abs_tol, rel_tol and strip_comments. For CSV text each row becomes an object, so array_keys can match rows by id; use csv_diff on files for large CSVs.

Input Schema

NameRequiredDescriptionDefault
aYes
bYes
formatYes
ignoreNo
abs_tolNo
rel_tolNo
array_keysNo
array_matchNoauto
max_changesNo
strip_commentsNo
max_value_charsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose non-obvious behavior: format is mandatory because it can't be inferred, both inputs must share one format, and CSV rows are parsed into objects. It also points to diff_files for output shape, which is acceptable since an output schema exists. It omits explicit safety/read-only framing, but a diff tool's non-mutating nature is self-evident.

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?

Purpose and the key constraint (format is required) are front-loaded, and the sentences stay short. A bit of space is spent on cross-references to diff_files, but each sentence carries information.

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

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter tool with zero schema descriptions, the definition covers the essentials (inputs, format requirement, CSV behavior) and the output schema handles return values. However, meaningful parameter semantics are delegated to diff_files, forcing an extra lookup before the agent can use options like abs_tol or array_match confidently.

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 0% across 11 parameters, so the description must compensate; it names ignore, abs_tol, rel_tol, array_keys, array_match and strip_comments, but only by name, deferring their meaning to diff_files. max_changes and max_value_chars are never mentioned, and no format or unit details (e.g. tolerance semantics) are given locally.

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 concrete verb and resource ('Semantic diff of two pasted strings') and immediately differentiates from diff_files by noting the inputs are pasted rather than on disk. An agent can distinguish it from diff_files and csv_diff without opening any schema.

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?

Gives an explicit selection rule ('Use this for content that is not on disk') and names the alternative for the file case. It also routes large CSV files to csv_diff. It stops short of stating when-not conditions for small/on-disk files, so it is clear context rather than full routing logic.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.