Skip to main content
Glama

Lookup Kit

regex_test

Read-only

Regex tester, test a regular expression and see matches. Test a JavaScript regular expression against a text: whether it matches, every match with its position and capture groups, and an optional replacement result. Send the pattern without slashes and flags separately (e.g. gi). Price: $0.002 per call (x402, USDC on Base).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pattern": "<pattern>",
      "text": "<text>"
    },
    "name": "regex_test"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYes
flagsNog
patternYes
replaceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description goes beyond that by disclosing the return shape (matches, positions, capture groups, replacement result) and, unusually, the cost model — $0.002 per call via x402 USDC on Base — which is material information an agent should have before invoking. It does not say how invalid patterns or flags are reported, which keeps it off a 5.

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 substantive content is front-loaded in the second sentence and the pricing note is a distinct, earned sentence. The opening clause 'Regex tester, test a regular expression and see matches' largely restates the tool name and the following sentence, which is the only visibly wasted text.

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?

With four parameters, no nested objects, and no output schema, the description does the necessary work: it explains what is returned and how to format the two tricky inputs. Remaining omissions — default flags, size limits, error behavior for invalid patterns — are small but real for a tool whose whole contract is the pattern/flags encoding.

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 0%, so the description carries the burden of explaining parameters. It does add real meaning for pattern (no slashes) and flags (separate string, example 'gi'), and implicitly covers text and replace, but it omits the flags default of 'g', the length ceilings (500/4000/500), and what replacement syntax (e.g. capture-group references) is accepted.

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 names a specific verb and resource — test a JavaScript regular expression against a text — and enumerates the exact outputs (match/no-match, every match with position and capture groups, optional replacement result). Nothing about the tool's function is left ambiguous, and none of the sibling utilities overlap with it.

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?

Usage context is clear: it is a JavaScript-flavored regex tester, and the description adds a concrete calling convention (send the pattern without slashes, flags separately, e.g. gi). There are no explicit when-not-use exclusions or named alternatives, but no sibling tool competes with this one, so the lack of routing guidance is a minor gap rather than a defect.

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