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

TableJSON 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

TableJSON 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. Added

TDQS

A4.6/5.0
Behavior5/5

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

Despite annotations covering the safety profile, the description adds substantial non-obvious behavior: formatting is preserved, phrases split by formatting are not matched, {{slide:N}} references are immune to replacement, and dry_run changes nothing. The extraction-by-formatting caveat and reference-number caveat are exactly the kind of hidden traits that prevent misuse.

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?

The purpose is front-loaded in the first clause, then productive caveats follow. It is dense with quoted parameter names and parentheticals, which costs a little readability, but every sentence carries useful information.

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

Completeness5/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 100% schema coverage, full annotations, and an output schema, the description fills the remaining gaps: return summary ('how many were replaced on which slides') and the tricky matching invariants. Nothing an agent needs to invoke it correctly is missing.

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 the baseline is 3, but the description adds semantics the schema lacks, notably that regex mode allows \1 backreferences in the replacement and that langs defaults to all languages. This elevates it slightly above the schema-only baseline.

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?

The description states a precise verb (find and replace) plus the exact scope: text/shape/button blocks, slide names, and code blocks within a whole presentation in one step. This clearly separates it from the per-block/per-slide editors like edit_blocks and edit_slides.

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?

It conveys context clearly (whole-presentation bulk replace, dry_run to only count, regex mode) and even states when matching will fail (formatting-split phrases, {{slide:N}} references). It stops short of explicitly naming alternative tools for narrower edits, so not a full 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