Skip to main content
Glama

Regex test / match / extract / replace (safe)

regex

FREE. Run a regular expression against input with catastrophic-backtracking protection (it runs in a killable worker with a hard timeout, so a pathological pattern returns a 400 instead of hanging). op is test|match|extract|replace. Args: pattern, input, flags (gimsuy), op, replacement (for replace).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opNotest | match | extract (capture groups) | replace. Default match.
flagsNoAny of g,i,m,s,u,y.
inputYesThe text to run it against (max 200k chars).
limitNoMax matches for global ops (default 1000).
patternYesThe regular expression source (max 2000 chars).
replacementNoReplacement string for op='replace' (supports $1 etc.).

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses catastrophic-backtracking protection, a killable worker with hard timeout, and 400 responses on pathological patterns, which is valuable safety context beyond the schema. It could add error behavior for invalid regex but is otherwise transparent.

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?

The description is three sentences, front-loaded with 'FREE' and the main purpose. No wasted words; every sentence adds value.

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?

Given the simple tool, the schema covers all parameters, and the description adds safety behavior and operation modes. No output schema exists, so return format isn't required. Sibling tools are unrelated, so no additional disambiguation is needed.

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?

Schema already covers all six parameters with descriptions (100% coverage). The description adds the op value 'extract' and lists flags (gimsuy), but these are already implicit in the schema. Baseline 3 is appropriate.

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 tool runs a regular expression against input with specific operations (test/match/extract/replace). The title reinforces this with 'Regex test / match / extract / replace (safe)'.

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 implies usage for regex operations but does not explicitly differentiate from sibling tools like 'text', which could also handle text manipulation. It does not provide when/when-not guidance.

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.

TDQS

A4.1/5.0
Disambiguation5/5

Each tool targets a distinct operation: unit conversion, cron parsing, currency conversion, date math, diff, encoding, hashing, ID generation, JSON schema validation, regex, RRULE expansion, text transforms, and timezone conversion. Even related tools like convert, currency, and timezone are clearly separated by domain, with descriptions that eliminate ambiguity.

Naming Consistency5/5

All tool names are lowercase single-word identifiers without separators or camelCase, forming a clean and predictable pattern. While some are verbs (convert, diff, encode) and others nouns (cron, currency, id), the uniform naming style ensures consistency.

Tool Count5/5

13 tools is well-scoped for a general-purpose utility belt. Each tool covers a common utility without redundancy, fitting comfortably within the ideal 3-15 range.

Completeness5/5

The tool surface covers a broad range of utilities: unit and currency conversion, date/time handling (datemath, timezone, cron, rrule), text processing (text, encode, regex, diff), cryptography (hash), ID generation, and schema validation. No obvious gaps exist for the stated purpose.