Skip to main content
Glama

diff_diff_words

Compare two text strings at the word level. Returns an inline diff with '+' for added words and '-' for removed words, plus counts of added and removed words. Ideal for version comparison or text analysis.

Instructions

[diff] Compare two strings at the word level and return an inline diff. Added words are prefixed with '+', removed words with '-'. Returns {inline: str, added_words: int, removed_words: int}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
text_aYes
text_bYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses that added words are prefixed with '+', removed with '-', and returns counts. This is adequate for a non-destructive read-only operation, though could mention if it handles whitespace or special cases.

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?

Two sentences: first explains operation and output, second details return object. No unnecessary words. Front-loaded with the core purpose.

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 description fully explains the return object with counts. Parameters are straightforward. Siblings exist but differentiation is minimal. For a simple string comparison tool, this is nearly complete.

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% with no parameter descriptions. The parameter names 'text_a' and 'text_b' are self-explanatory, but the description does not add meaning beyond 'two strings'. For a simple tool, this is adequate but lacks detail (e.g., expected encoding or format).

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 verb 'compare', the resource 'two strings at the word level', and the output format. It distinguishes itself from sibling diff tools (e.g., diff_diff_files, diff_diff_text) by specifying word-level granularity.

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?

The description implies usage for word-level comparison, but does not explicitly state when to use this tool versus alternatives like diff_diff_text (character-level) or diff_diff_files. No when-not or exclusion criteria provided.

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/0-co/agent-friend'

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