Skip to main content
Glama

Regex tester, test a regular expression: test a regular expression against a text and get every match with its groups

regex_test
Read-only

Run a JavaScript regular expression against a text and return every match with its index and capture groups (named groups included). Pattern up to 300 characters, text up to 5,000; patterns with nested quantifiers such as (a+)+ are refused as unsafe, uncharged. Use to check a pattern before using it in code. Example: pattern=(\d{4})-(\d{2}), text=2026-10 and 2027-01. Price $0.01/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Input Schema

NameRequiredDescriptionDefault
textYesThe text to search
flagsNoFlags such as g, i, m, s, u (g is always added)
patternYesThe pattern without slashes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: hard input limits (300-char pattern, 5,000-char text), refusal of unsafe nested quantifiers like (a+)+, per-call pricing through x402 USDC or card key, 25 free calls, and the explicit note that repeats are not free. These details complement readOnlyHint=true and idempotentHint=false rather than contradicting them.

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?

Front-loaded with the core behavior and limits, then the example, then pricing. It is dense and every sentence carries information, though the billing clauses are slightly compressed and could be split for readability.

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?

Without an output schema, the description still explains the return shape (matches with index and capture groups, including named ones). Input limits and safety refusals are covered, so an agent has everything needed to call it correctly.

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 coverage is already 100%, so the baseline is 3, but the description adds value with the pattern length cap and a concrete pattern/text example. It does not elaborate on flags beyond what the schema states (e.g., precedence, the always-on g flag), leaving a small gap.

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 opening sentence gives a precise verb+resource (run a JavaScript regex against text) and states exactly what is returned: every match with index and capture groups, named groups included. An agent can immediately distinguish this from sibling utilities such as text_extract or text_stats.

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?

'Use to check a pattern before using it in code' gives a clear usage context, and a concrete worked example follows. It does not name an alternative or state when not to use it, but the use case is unambiguous.

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.