Skip to main content
Glama
brentspore

buildutilities-mcp

by brentspore

Escape Regex Literal

escape_regex
Read-onlyIdempotent

Escape a string to use it as a literal inside a regular expression, preventing special characters from being interpreted as syntax.

Instructions

Escape a string so it can be used as a literal inside a regular expression.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds the specific behavioral context of escaping for regex literals, which goes beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, concise sentence with no fluff. It is front-loaded with the action and purpose, making it highly efficient for an agent to parse.

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 simple utility with one parameter and no output schema, the description provides enough context. It explains the input and the intended use without needing to detail every escaped character, which is a reasonable level of detail.

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 description coverage is 0%, so the description carries the burden of explaining the single 'text' parameter. The description states 'Escape a string', making it clear the input is the string to escape. This is sufficient for a single-parameter tool.

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 the specific verb ('escape') and resource ('a string') with the precise purpose of using it as a literal inside a regular expression. This distinguishes it from siblings like test_regex (which tests regex) and other encode/decode utilities.

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?

The description clearly implies the tool is for escaping strings for regex literal use, which differentiates it from other string utilities. However, it does not explicitly state when not to use it or mention alternatives, so some inference is required.

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