Skip to main content
Glama

replace_multiple

Apply multiple targeted CriticMarkup revisions across different sections in one call; edits are processed bottom-to-top to keep offsets stable, and those past the configured cutoff are rejected.

Instructions

Applies multiple targeted revisions across different sections in a single call using CriticMarkup. Edits are applied bottom-to-top to maintain offset stability. Targeted edits past the configured cutoff line are rejected.

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": {
      "filepath": "<filepath>",
      "edits": "<edits>"
    },
    "name": "replace_multiple"
  }
}

Input Schema

NameRequiredDescriptionDefault
editsYes
filepathYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does disclose non-obvious mechanics: edits are applied bottom-to-top to preserve offset stability, and edits past the cutoff line are rejected. It omits whether the batch is atomic on partial failure and what happens to conflicting or overlapping sections, which are the main remaining unknowns for a mutation tool.

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

Conciseness4/5

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

Three short sentences, front-loaded with purpose, then ordering semantics, then the rejection rule. No filler, though 'the configured cutoff line' is unexplained jargon that assumes knowledge the agent may not have.

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 purpose and application-order behavior are well covered and an output schema exists, so return values need no explanation. The significant hole is the entirely undocumented shape of the edits array, which is the single most important thing an agent needs in order to call this tool correctly.

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% and the edits array is typed only as a generic object with additionalProperties, so the description must compensate. It only signals that each edit is a CriticMarkup targeted revision per section, without naming the per-edit fields (section target, insertion, deletion, comment) an agent must supply; filepath is self-evident and gets no explanation either.

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 gives a specific verb and resource: it applies multiple targeted revisions across different sections in a single call, which contrasts implicitly with the sibling replace_all. It does not explicitly name replace_all or explain that replace_all is for whole-document substitution, so sibling differentiation is inferable 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?

The phrase 'in a single call' hints at batch efficiency over repeated single-edit calls, and the cutoff-line sentence states one rejection condition. There is no explicit guidance on when to prefer this over replace_all or request_changes, and no mention of prerequisites like file format or review state.

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