Skip to main content
Glama

replace_all

Globally replace every occurrence of a word or phrase in a Markdown document body using CriticMarkup while protecting frontmatter, inline anchors, and JSON comments.

Instructions

Globally replaces ALL instances of a word or phrase throughout the document body using CriticMarkup. Operates across the full document body regardless of cutoff line, while frontmatter, inline anchors, and JSON comment payloads remain strictly protected.

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>",
      "search_string": "<search_string>",
      "replacement_string": "<replacement_string>"
    },
    "name": "replace_all"
  }
}

Input Schema

NameRequiredDescriptionDefault
filepathYes
search_stringYes
replacement_stringYes

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, the description carries the full burden and does substantial work: it discloses that edits are made via CriticMarkup (i.e., suggestion markup rather than a silent overwrite) and enumerates what is protected — frontmatter, inline anchors, JSON comment payloads. It stops short of stating permission requirements, whether the change must be accepted, or what happens on zero matches.

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?

Two tight sentences with the scope constraint ('ALL', full document body) front-loaded ahead of the protection carve-outs. The clause 'regardless of cutoff line' is opaque to a reader without context on that concept, which is the only real waste.

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?

An output schema exists, so return values need not be explained, and the protection rules are well covered. However, for a mutation tool with no annotations and zero schema descriptions, the missing matching semantics (literal vs regex, case sensitivity), filepath conventions, and confirmation that CriticMarkup edits require acceptance leave real 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 coverage is 0% and the schema only lists bare titles, so the description must compensate; it does so only partially. It implies search_string is a literal 'word or phrase' but never says whether matching is regex, case-sensitive, or whole-word, and it says nothing about the filepath format.

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: 'Globally replaces ALL instances of a word or phrase throughout the document body,' plus the mechanism (CriticMarkup). It never names the sibling 'replace_multiple' to draw the boundary, so the agent must infer the distinction between one global substitution and several targeted ones.

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 word 'ALL' plus 'globally' implies the use case is exhaustive substitution, but there is no explicit when-to-use/when-not statement and no routing to an alternative such as replace_multiple or request_changes. Usage is inferable rather than stated.

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