Skip to main content
Glama
Jul879n

reposynapse

by Jul879n

patch_file

Apply a unified diff patch to a file. Send only changed lines to save tokens on large files.

Instructions

Apply a unified diff patch to a file. The AI only sends changed lines, not the full file — saves tokens on large files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesRelative file path to patch
patchYesUnified diff string (hunks starting with @@ -L,N +L,N @@)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.10.0

TDQS

A3.5/5.0
Behavior2/5

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

With no annotations provided, the description must disclose behavioral traits on its own. It only says the tool applies a diff patch; it does not mention failure behavior, whether changes are reversible, what happens on a non-applicable patch, or any side effects. This is a notable gap for a file-mutating tool.

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: the first front-loads the action, the second explains the practical benefit. No wasted words, and information is easy to parse.

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 mutation tool with no annotations and no output schema, the description covers the core operation but omits failure modes, return values, and edge-case behavior. It is adequate for a basic understanding but leaves important gaps for an agent deciding on reliable invocation.

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%, with clear descriptions for both 'file' and 'patch'. The description does not add additional parameter-level semantics beyond noting that only changed lines are sent, so the baseline score of 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 a specific verb and resource: 'Apply a unified diff patch to a file.' It also differentiates itself from full-file write approaches by explaining the token-saving advantage, which helps an agent understand its distinctive role among the sibling tools.

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 token-saving rationale implies this tool is for large files where sending the full file would be wasteful, but it does not explicitly name alternatives like replace_symbol or insert_after_symbol or state when not to use it. Usage context is present, but exclusions and explicit routing are missing.

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