Skip to main content
Glama

Edit file in several places

file_multi_replace

Apply exact, unique old_str → new_str replacements to one file, in order. No prior read is required.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>",
      "edits": "<edits>",
      "explanation": "<explanation>",
      "account": "<account>"
    },
    "name": "file_multi_replace"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
editsYes
accountYesAccount (app) UUID; call account_list to find it
filesystemNosource
explanationYesWhy you are making this call, in one sentence for the user.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=false), so the description's added constraints carry real value: matches must be exact and unique, and edits apply in order. It omits what happens when a match is non-unique or when one edit fails mid-list (atomic vs partial application), which is the main remaining behavioral gap.

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?

Two tight sentences with zero filler, front-loading the core operation and then the notable 'no prior read' relief. Every clause carries information the agent needs.

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?

For a 5-parameter mutation tool with no output schema and only 40% schema coverage, the description leaves meaningful gaps: the filesystem source/content distinction, failure semantics for non-unique matches, and whether the batch is atomic. It is adequate to invoke the tool but not to predict its error behavior.

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

Parameters3/5

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

Schema coverage is only 40%, so the description partially compensates by defining edits semantics (ordered old_str→new_str pairs, unique match requirement) and constraining path to one file. But the filesystem enum (source vs content) and its effect are not explained anywhere in the description, and the uniqueness rule for old_str is not restated near the parameter.

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?

The description states a specific verb+resource: applying exact, unique old_str→new_str replacements to one file, in order. It clearly scopes the operation to a single file and to multiple edits, which implicitly distinguishes it from single-replacement siblings like file_replace, though it never names an alternative explicitly.

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?

'No prior read is required' tells the agent it can skip file_view before calling, which is useful implied guidance. However, there is no explicit statement of when to prefer this over file_replace or str_replace_based_edit_tool, nor any exclusions for when this tool would fail.

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