Skip to main content
Glama

document_replace

Replaces specified text in the document with new content. Supports regex patterns for advanced find-and-replace operations.

Instructions

Finds and replaces text in the document

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regexNoInterpret pattern as regex
patternYesSearch text or regex
replacementYesReplacement text
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavioral traits. It only states 'Finds and replaces text' but fails to mention important details like whether replacement is global or per occurrence, case-sensitivity, in-place modification, or expected side effects.

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 a single, front-loaded sentence that directly states the tool's purpose. It is concise and avoids extraneous words, though it could include more operational context without becoming verbose.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the absence of an output schema and the mutation nature of the tool, the description lacks important details such as scope (entire document or selection), return value (e.g., number of replacements), and handling of edge cases. It does not differentiate from document_set_content effectively.

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

Parameters3/5

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

The schema already describes all three parameters with 100% coverage (pattern, replacement, regex). The description adds no additional meaning beyond what the schema provides, so it meets the baseline but does not enhance understanding.

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 'Finds and replaces text in the document' clearly identifies the action (find and replace) and the resource (document), differentiating it from siblings like document_search (which only finds) and document_insert (which inserts without replacement).

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 description does not provide explicit guidance on when to use this tool vs alternatives such as document_search or document_set_content. It implicitly suggests usage for text replacement but lacks exclusions or context about scope (e.g., single occurrence vs all occurrences).

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/juergenkoller-software/inkra-mcp'

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