Skip to main content
Glama
Claude File Manager MCP

Claude File Manager MCP

by sadd11

Multiple edits at once

multi_edit

Applies multiple find-and-replace edits to one file atomically, leaving it unchanged if any fragment is missing, and returns a combined diff with a backup saved first.

Instructions

Applies several replacements to one file atomically: if any fragment is not found, the file is left unchanged. Returns a combined diff. A backup is saved before editing.

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>"
    },
    "name": "multi_edit"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesFile path
editsYesList of replacements, applied in order

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does well: it discloses the all-or-nothing failure mode ('if any fragment is not found, the file is left unchanged'), the return shape (combined diff), and the side effect of writing a backup. It does not mention permissions, overwrite semantics on partial matches, or how conflicts within the ordered edit list are handled.

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 sentences with no waste; the atomicity guarantee, the return value, and the backup side effect each appear once and in a sensible order. Nothing is repeated from the schema or padding.

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

Completeness4/5

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

For a mutation tool with no annotations and no output schema, the description covers the three things an agent most needs: failure behavior, return value, and backup creation. A brief note on reversibility via the undo sibling would close the remaining gap.

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 description coverage is 100%, so both parameters and the nested edit fields are already documented, including that edits are applied in order. The description reinforces the single-file constraint on 'path' but adds no syntax or format detail beyond the schema, which is the expected baseline here.

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 ('Applies several replacements to one file'), which makes it distinguishable from a single-edit sibling and from cross-file replacement tools. It stops short of naming any sibling explicitly, so the differentiation is inferred 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 Guidelines3/5

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

'several replacements to one file' implies when this tool is preferable to a single-edit tool, and the atomicity clause hints at why to batch. However there is no explicit 'use X when Y' routing, no prerequisites, and no note on when a single edit or cross-file replace would be more appropriate.

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