Skip to main content
Glama

batch_replace

Replace multiple strings in a document at once by defining a dictionary of old to new text replacements.

Instructions

Replace multiple strings in the document at once.

Args: replacements: Dictionary of old -> new text replacements Example: {"old1": "new1", "old2": "new2"}

Returns: Success message with replacement count or error message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
replacementsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations exist, so the description carries full burden. It states the function but does not disclose behavioral details such as whether replacements are case-sensitive, affect formatting, trigger track changes, or are reversible. The example is helpful but insufficient for full transparency.

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 description is brief and uses clear sections for Args and Returns. While not front-loaded, it is efficient and avoids fluff. Minor structure improvement would be to lead with the primary purpose more prominently.

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?

Given the tool has an output schema (not shown) and one parameter, the description adequately covers return format (success/count or error). However, it lacks context on order of replacement application, behavior with overlapping keys, and interaction with the document state (e.g., undo).

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?

With 0% schema description coverage, the description must compensate. It explains the 'replacements' parameter with a concrete example, adding meaning beyond the schema's basic type definition. However, it omits details like whether keys are case-sensitive or support special characters.

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 clearly states 'Replace multiple strings in the document at once,' with a specific verb (replace) and resource (strings in document). Among sibling tools like find_and_replace (likely single replacement) and redact_text, this tool is distinctly positioned for batch replacements.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

The description does not provide any guidance on when to use this tool versus alternatives (e.g., find_and_replace for single replacements, redact_text for redaction). There is no explicit context or when-not-to-use advice, leaving the agent to infer usage.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rofiqcp/mcp-dokumen'

If you have feedback or need assistance with the MCP directory API, please join our Discord server