Skip to main content
Glama

patch_file

Destructive

Edit a text file by exact search and replace, then publish. Each old_text must match exactly once.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
siteYes
editsYesEdits applied in order.
messageNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, and the description adds the publish side effect and the uniqueness constraint on old_text. This goes beyond the annotations by revealing that the tool triggers deployment and requires exact matches. However, it does not detail failure behavior or consequences of partial edits, leaving some transparency gaps.

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 a single concise sentence (15 words) that front-loads the core action and constraint. Every word adds value, and there is no redundancy or filler.

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?

The tool has 4 parameters and a nested edits array, but the description omits details on parameter semantics and the application order of edits. While the schema mentions 'Edits applied in order', this is not reinforced in the description. With no output schema and low schema coverage, the description should provide more context about expected inputs and side effects, but it only covers the uniqueness and publish aspects.

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 coverage is only 25%, with most parameters (site, path, message) lacking descriptions. The tool description does not compensate by explaining these parameters or the edit structure beyond the uniqueness rule. It fails to clarify what 'site' and 'path' refer to or how 'message' is used, leaving significant semantic gaps.

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 the tool edits a text file via exact search and replace, then publishes. This specific verb-resource-method combination distinguishes it from sibling tools like write_files (full overwrite) and delete_files (removal). The publish step is also an explicit side effect that sets it apart.

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 description implies usage for targeted edits rather than full rewrites, but does not explicitly mention alternatives or exclusions. The constraint 'Each old_text must match exactly once' gives a condition, but no direct guidance on when to choose this over write_files or other siblings.

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.

Resources