Skip to main content
Glama

Apply many exact-text patches

fs_apply_patch_many
Destructive

Batch apply validated exact-text replacements to many files in one call. If any replacement for a file fails validation, that file is not written.

Instructions

Apply validated exact-text replacements to many files in one call. main.cs requires fs_transaction with compile validation. A file is not written if any replacement for that file fails validation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYes
dryRunNo
deviceIdNo
deviceNameNo
concurrencyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare destructive=true and readOnly=false, so the safety profile is covered. The description adds genuinely new behavior: replacements are validated and a file is not written if any of its replacements fail, which tells the agent about the per-file atomicity granularity. It says nothing about dryRun, concurrency, or cross-file atomicity.

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?

Three short, front-loaded sentences with zero filler. The primary action comes first, the sibling constraint second, and the atomicity guarantee last.

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?

It covers the core semantic and the per-file failure rule, but for a destructive 5-parameter mutation tool with no output schema and no parameter descriptions, it omits dryRun behavior, concurrency implications, device targeting, and any error/return expectations. Adequate minimum, clear gaps.

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 5 parameters, so the description must carry the load and largely does not. It never mentions dryRun, concurrency, deviceId/deviceName, or the oldText/newText/replaceAll structure of a replacement.

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 and resource (apply exact-text replacements) plus scope (many files, one call), which cleanly distinguishes it from fs_write_many and edit_block. It does not explicitly name those siblings, but the 'exact-text replacement' framing is precise enough for selection.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a concrete when-not rule: main.cs requires fs_transaction with compile validation instead. That is a real routing condition, though it covers only one special case and says nothing about when to prefer this over fs_write_many or edit_block.

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

Deploy Server

Other Tools