Skip to main content
Glama

apply_text_patch

Apply exact UTF-8 text replacements to files, using a SHA-256 hash to verify file integrity before applying changes.

Instructions

Apply exact UTF-8 text replacements with a required sha256 guard.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
dry_runNo
replacementsYes
max_diff_bytesNo
expected_sha256Yes
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions the sha256 guard but does not disclose behavior on hash mismatch, whether the operation is destructive, permissions needed, or rollback possibilities.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single clear sentence, but it is too brief. It could include essential parameter context without becoming verbose.

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

Completeness1/5

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

The tool has 5 parameters, no output schema, and no annotations. The description fails to explain the replacements format, dry_run behavior, diff byte limit, or the sha256 guard mechanism, making it inadequate for correct invocation.

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

Parameters1/5

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

Schema description coverage is 0%, yet the description adds no information about parameters like path, dry_run, replacements, max_diff_bytes, or expected_sha256. The agent gets no help beyond the bare 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?

The description clearly states the tool applies exact UTF-8 text replacements with a sha256 guard, distinguishing it from reading or searching tools like read_text and search_text.

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 guidance on when to use this tool vs alternatives, no prerequisites or when-not-to-use conditions. The agent must infer usage from the name and schema alone.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fanghaoling/brainregion'

If you have feedback or need assistance with the MCP directory API, please join our Discord server