Skip to main content
Glama

Aayat AI

Regex explain ($0.001)

regex-explain
Read-only

Validate and explain a regular expression (JavaScript flavour): is it valid, what each part means in plain English, whether it risks catastrophic backtracking (ReDoS), and what it matches in up to 20 test strings (with groups). Price: $0.001 in USDC per call (x402 or prepaid credits). In the free trial.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
flagsNoJavaScript flags: g i m s u y d v.
testsNoStrings to try it on.
patternYesThe regex source, without slashes, e.g. ^(\d{3})-(\d{4})$

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
riskYesWhy it may backtrack catastrophically, or null. Tests are not run when set.
errorYesThe syntax error if invalid.
flagsNo
partsYes
testsYes
validYes
groupsNoNumber of capturing groups.
patternNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, and idempotentHint. The description adds useful behavioral context beyond those annotations: JavaScript flavour, ReDoS/catastrophic-backtracking checking, test strings with groups, and payment/cost details including x402, prepaid credits, and free-trial status.

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?

The description is front-loaded with the primary action and outputs, then appends pricing and trial information. It is dense but efficient, with no redundant restatement of the tool name or title.

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?

An output schema exists, so return values need not be described. The description covers validity checking, explanation, ReDoS risk, test-string matching, JS flavour, and pricing, leaving little ambiguity for a tool of this complexity.

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 description coverage is 100%, so the schema already documents pattern, flags, and tests in detail. The description adds only marginal parameter context by noting up to 20 test strings and group capture, matching the baseline where structured fields carry most parameter semantics.

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 states a specific verb and resource: validate and explain a regular expression, with JavaScript flavour. It lists concrete outputs (validity, plain-English meaning, ReDoS risk, test-string matches with groups), making it clearly distinct from sibling *-explain tools and other utilities.

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?

Usage is strongly implied by the purpose, but there is no explicit guidance on when to use this versus alternatives, nor any stated exclusions or prerequisites. The agent can infer it is for regex explanation, but the description does not actively route among siblings.

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.

Resources