Skip to main content
Glama

Regex Replace

regex_replace

Replace regular expression matches in text, with an optional max-replacement count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
payloadYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

C2.7/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It notes the optional max-replacement count but omits what happens to unmatched text, error behavior for invalid patterns, and the critical meaning of the count default of 0 (all vs. none).

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?

A single efficient sentence with the operation front-loaded. It is appropriately sized, though it sacrifices needed detail for brevity.

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?

For a tool with nested object parameters, zero schema descriptions, no annotations, and no output schema, this one-line description leaves too much undocumented. An agent lacks the detail needed to call the nested payload correctly.

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 description coverage is 0%, so the description must compensate, and it only loosely gestures at the four nested fields (text, pattern, replacement, count). It adds no meaning such as replacement backreference syntax or the semantics of count=0.

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?

The description states a specific verb ('Replace') and resource ('regular expression matches in text'), so the core operation is immediately clear. It does not differentiate itself from the sibling regex_test, which an agent might otherwise consider for regex work.

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?

There is no when-to-use guidance and no mention of alternatives, despite a directly relevant sibling (regex_test) existing for validating/matching patterns. The agent receives no signal about when this tool is preferable.

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.