Skip to main content
Glama

Diff Lines

diff_lines
Read-onlyIdempotent

Compute a line-level diff between two texts (keyless, offline). Returns the change list (equal/add/remove), an added/removed/unchanged summary, and a unified-diff-style string with +/- prefixes.

Input Schema

NameRequiredDescriptionDefault
aYesThe original ("before") text.
bYesThe new ("after") text.
contextNoIf true, include unchanged lines in the unified output (default true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "a": "line 1\nline 2\nline 3",
      +    "b": "line 1\nline 2 modified\nline 3"
      +  },
      +  {
      +    "a": "function foo() {\n  return 42;\n}",
      +    "b": "function foo() {\n  console.log('called');\n  return 42;\n}",
      +    "context": true
      +  }
      +]
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint true, idempotentHint true, destructiveHint false, indicating safe read-only behavior. The description adds value by specifying the output structure (change list, summary, unified-diff string), which is helpful beyond annotations. No contradictions.

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: first states the action and scope, second lists outputs. Every word is necessary and no filler.

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?

For a tool with no output schema, the description adequately explains the return values. It covers the core functionality but could mention edge cases (e.g., handling of empty strings). Overall, it is fairly 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 100%, so the description does not need to add parameter details. The description does not add any parameter-level information beyond what is already in the schema. Baseline 3 is appropriate.

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 computes a line-level diff between two texts, specifying it is keyless and offline, which distinguishes it from any sibling tools that might perform similar functions. It also enumerates the exact outputs (change list, summary, unified-diff string).

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 mentions 'keyless, offline' which implies it is for simple text comparison without external context, but it does not explicitly state when to use this tool versus alternatives or when not to use it. Given the sibling tools are mostly unrelated, guidance is minimal but adequate.

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.