Skip to main content
Glama

regex

Apply a regex to text and return all matches + capture groups (deterministic; LLMs guess regex wrong). Send { pattern, text, flags? }. [x402 paid tool — price $0.003; POST /api/regex]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText to search (<=100k chars)
flagsNoRegex flags, e.g. gi
patternYesRegular expression

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
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 states the tool is deterministic and mentions pricing, but it does not explain behavior on invalid patterns, empty matches, or error responses. For a paid tool, more detail on return format and edge cases is expected.

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 a single sentence with a bracketed note, both concise and front-loaded. Every sentence provides essential information: purpose, input format, determinism, and pricing. No redundancy or wasted words.

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 absence of output schema and annotations, the description provides core purpose and parameter format but lacks details on return structure or error handling. It is adequate for a simple tool but incomplete for fully informed usage.

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 input schema covers all three parameters with descriptions (text max chars, flags example, pattern). The description only recaps the input format without adding new meaning. Since schema coverage is 100%, baseline is 3, and the description does not exceed that.

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 applies a regex to text and returns all matches and capture groups. It uses a specific verb 'apply' and specifies the resource and output. The mention of determinism distinguishes it from LLM-based alternatives, and sibling tools like 'extract' are not regex-based, confirming its unique purpose.

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 provides clear context by specifying the expected input format ('Send { pattern, text, flags? }') and hints that the tool should be used when accurate regex is needed because 'LLMs guess regex wrong'. However, it does not explicitly list when-not-to-use or alternative tools, though no siblings serve the same purpose.

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.