Skip to main content
Glama

fs_patch

Apply a stale-safe hashline patch to exactly one file, replacing old hunks with new content and using an optional expected hash to avoid conflicts.

Instructions

Apply a hashline-style single-file patch (stale-safe). Mutates exactly one file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
patchYes
expected_hashNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.7/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. "Stale-safe" and "mutates exactly one file" are useful hints, but it omits what happens on a hash mismatch, whether the patch is atomic/partial, and any permission requirements — key facts 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?

Two short sentences with no padding, and the mutation scope is front-loaded alongside the core purpose. The second sentence is slightly redundant with "single-file" already in the first, but it is not wasteful.

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?

A single-file mutation tool with no annotations, no output schema, 0% parameter coverage, and a nested patch structure. The description does not cover failure behavior, the role of expected_hash, or the hunk format, so it is well short of complete for this complexity.

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% across three parameters, including a nested patch.hunks object, and the description explains none of them. "Hashline-style" is unexplained jargon that gestures at the old/new match format but conveys no actionable semantics, and expected_hash is never mentioned.

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 ("hashline-style single-file patch") and scopes it to one file, which separates it from the whole-file fs_write sibling. However, it never names fs_write or any sibling explicitly, so differentiation is inferential rather than stated.

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?

No when-to-use guidance at all. It does not say when to prefer this over fs_write, whether expected_hash is required for the stale-safe guarantee, or what the caller should do on failure — the agent must infer all routing decisions.

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