Skip to main content
Glama

Find and replace

replace_text

Find and replace words in a whole presentation you may edit, in one step: the texts of text, shape and button blocks (in every language by default, or only "langs"), the slide names, and with "in_code": true the code of code blocks. Formatting stays (the words are replaced inside it; a phrase split by formatting, like half of it bold, is not found). The number of an automatic slide reference ({{slide:N}}) is not text and is not found: it changes by itself when slides move; to point a reference to another slide, write the block's html with a new {{slide:N}}. "regex": true makes "find" a Python regular expression ("replace" may use \1). "dry_run": true only counts. Returns how many were replaced on which slides.

Input Schema

NameRequiredDescriptionDefault
findYesWhat to find (at most 500 characters).
slugYesThe presentation's slug (its address: /movie/<slug>/).
langsNoOnly these languages of the texts (default: all).
regexNo"find" is a regular expression (default: plain text).
dry_runNoOnly count, change nothing.
in_codeNoThe code of code blocks too (default: false).
replaceYesWhat to put instead (may be empty).
in_namesNoThe names of the slides too (default: true).
slide_idsNoOnly these slides (ids).
to_numberNoOnly the slides up to this number (inclusive).
match_caseNoCase matters (default: true).
from_numberNoOnly the slides from this number on (1-based).
base_versionNoOptional: the "version" of the presentation as you read it; refused when it changed meanwhile.

Output Schema

NameRequiredDescriptionDefault
slidesYes
dry_runNo
versionNoStamp of the content as it is now: give it back as "base_version" to change it only if nobody else did meanwhile.
replacedYesHow many places were (or, with dry_run, would be) changed.
layout_warningsNoHow the changed slides will probably look: texts too long for their blocks, blocks outside the slide, texts over each other (estimated -- look at them).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / layout_warnings / items / properties / lang
      Added value: +{
      +  "description": "Only the text in this language has the problem.",
      +  "type": "string"
      +}
  2. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare the generic mutation profile (readOnly=false, destructive=false, idempotent=false); the description adds non-obvious behavioral facts an agent could not infer: formatting is preserved but a phrase split by formatting is not matched, {{slide:N}} references are not treated as text, and the return value reports counts per slide. These are exactly the surprises that would cause silent failure.

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?

Front-loaded with the core action and tightly packed, with caveats following the primary statement. Some density and parenthetical nesting (the formatting-split example, the reference aside) make it slightly harder to scan, but no sentence is filler.

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 13-parameter mutation tool with annotations and an output schema, the description covers scope, matching rules, formatting behavior, dry-run, and return shape. It stays silent on edge cases such as how match_case interacts with regex: true and whether the slide-selection parameters combine, which leaves a small gap.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3, but the description adds meaning beyond the schema: it clarifies that langs defaults to all languages, that in_code must be opted into, and — most valuably — that with regex: true the 'replace' string may use \1 backreferences, which the schema does not say. Minor combination semantics (slide_ids vs from_number/to_number) remain unaddressed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Find and replace words in a whole presentation') and enumerates the exact surfaces affected: text/shape/button block texts, slide names, and code blocks when in_code is true. An agent can distinguish this bulk-replace tool from edit_blocks or update_slide without opening schemas.

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 clear operational conditions — regex: true for Python regex, dry_run: true to only count, in_code: true to include code — and explicitly redirects one case to a different mechanism ('to point a reference to another slide, write the block's html with a new {{slide:N}}'), which implies edit_blocks. It never names an alternative tool outright or says when not to use this one, so it falls short of a 5.

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