Skip to main content
Glama

Summarize a unified diff

bpj_summarize_unified_diff
Read-onlyIdempotent

Validate unified diff hunk ranges and count added and deleted lines per file.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "diff": "<diff>"
    },
    "name": "bpj_summarize_unified_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
diffYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered. The description usefully adds that the tool both validates hunk ranges and produces per-file added/deleted counts, but it does not say whether an invalid range produces an error or a reported finding, or how large diffs beyond the 8000-char cap are handled.

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?

A single front-loaded sentence with no filler; every clause carries information. It is arguably too dense — it reads more like a list of internal steps than a summary of the result — but nothing is redundant.

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 a one-parameter, no-output-schema tool the description should carry the return shape, and it only half does: it names the metrics (per-file added/deleted counts) but not the structure or the error/validation-report behavior. Annotations cover the safety side, so the remaining gap is modest rather than severe.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Only one parameter and schema coverage is 0%, but the description concretely constrains it: the value is a unified diff, which tells the agent it must be hunk/header-formatted text rather than an arbitrary string. That is the single most important semantic fact about the parameter and it is supplied in the prose.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Two specific verbs (validate, count) tied to a specific resource (unified diff hunk ranges, added/deleted lines per file), so an agent knows exactly what the tool does and roughly what it returns. It does not name any sibling, but the sibling list contains no other diff tool, so differentiation is not really at stake.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance, no stated prerequisites (e.g. that input must be a real unified diff with @@ headers), and no mention of what to do instead if the input is not a diff. The only usage signal is implicit in the verb 'validate'.

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.