Skip to main content
Glama

mechacut

text_apply_diff

Apply a unified diff STRICTLY: every context and deletion line must match its documented position; mismatches name the hunk and line — no fuzz, no silent reflow. Paid route (x402).

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": {
      "text": "<text>",
      "diff": "<diff>"
    },
    "name": "text_apply_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
diffYesunified diff
textYesthe file text

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses strict positional matching semantics, absence of fuzz or silent reflow, and precise failure behavior ('mismatches name the hunk and line'). It also flags a paid x402 route, which is operationally important. It stops short of saying whether the output is the patched text and whether a failed hunk leaves state untouched.

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 tight sentences, front-loaded with the core action and constraint, then the failure mode and cost note. No sentence is padding.

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 two-parameter tool with no annotations and no output schema, the behavioral contract is decently covered, but the return value (patched text?) and atomicity on a mid-diff failure are unaddressed. Since no output schema exists, that gap falls on the description.

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% (both params documented as 'unified diff' and 'the file text'), so the baseline is 3. The description reinforces the diff-format contract ('documented position', 'context and deletion line') but adds no syntax or format detail beyond the schema.

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 precise verb+resource ('Apply a unified diff') plus a distinguishing qualifier ('STRICTLY'), so an agent can tell it apart from diff-computing siblings like text_diff without any schema inspection.

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 explicit when-to-use or when-not-to-use guidance, and no sibling is named as an alternative (e.g., nothing distinguishes it from text_patch). The usage context is only inferable from the tool's behavior, not stated.

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.