Skip to main content
Glama

Remote Apply Patch

remote_apply_patch

Apply text edits to remote HPC files only when the file hash and expected text-match counts agree, preventing stale or mismatched changes.

Instructions

Apply text edits only when the remote revision and match counts agree.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
editsYes
project_idYes
relative_pathYes
expected_sha256Yes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior3/5

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

With no annotations the description carries the full burden, and it does disclose a genuinely important trait: edits are applied conditionally, gated on the expected revision hash and match counts (optimistic-concurrency / exact-match semantics). However, it omits what happens on mismatch (rejected or partial?), any permission requirements, and reversibility, so it falls short of full disclosure for a mutation tool.

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 padding or repetition, and the precondition is stated directly. It is efficient, though its brevity here signals under-specification rather than disciplined economy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a hash-guarded patch tool with a nested edit list, no annotations, no output schema, and 0% schema coverage, one sentence is far too thin. An agent cannot learn the failure/mismatch behavior, the semantics of expected_count, or what a successful application returns.

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

Parameters2/5

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

Schema description coverage is 0% and there are four required parameters including a nested edits array, so the description should compensate. It only obliquely implies 'remote revision' maps to expected_sha256 and 'match counts' to expected_count, leaving project_id, relative_path, old_text/new_text untouched and no format or matching rules explained.

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?

States a specific verb ('Apply') and resource ('text edits') scoped to a remote target, which is enough to place it against the read-only siblings (remote_read, remote_stat, remote_list). It does not explicitly name a sibling or contrast itself with remote_upload/remote_download, but the patch-application purpose is unambiguous.

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 and no alternatives named. The clause 'only when the remote revision and match counts agree' is a precondition, not usage direction, and it never explains when to choose this over remote_upload or remote_execute for changing remote content.

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