Skip to main content
Glama
matetools

@mate-tools/mcp-server

Official
by matetools

text_diff

Diff two strings by line, word, or character to get structured changes, a unified diff, and a Jaccard similarity score.

Instructions

Diff two strings by line, word or character. Returns structured changes (+/-/=), git-style unified diff, and a Jaccard similarity score. Use line mode for code/config; word mode for prose; char mode for short strings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes
modeNoline
contextNo
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the output types and the three modes, but it does not explicitly state that the operation is non-mutating or side-effect free, nor does it address edge cases like empty strings or performance. Still, the nature of a diff tool implies read-only behavior, so the score is moderate.

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?

The description is two sentences long, with the first sentence stating the core function and outputs, and the second giving mode guidance. Every sentence adds value, and there is no redundancy or fluff.

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?

The tool has 4 parameters and no output schema. The description lists the three return formats but does not detail the exact structure of the changes or the context parameter. Given the tool's simplicity, this is nearly sufficient, but it could mention that 'context' controls the number of surrounding lines in the unified diff.

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 compensate. It adds meaning to 'mode' with usage examples, but does not explain 'a', 'b', or 'context' beyond what the schema shows. The parameter names and defaults (e.g., context: 3) are somewhat self-explanatory, but the description could be more explicit about the 'context' parameter behavior.

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 clearly states the tool diffs two strings by line, word, or character, and specifies the output formats (structured changes, unified diff, Jaccard score). This distinguishes it from sibling tools like count_lines or case_convert, which serve different purposes.

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 description provides explicit mode-selection guidance ('line mode for code/config; word mode for prose; char mode for short strings'), helping the agent choose correctly. It does not mention alternatives or exclusions, but the context is clear enough for a focused utility.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/matetools/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server