Skip to main content
Glama

Agent Data Tools: Utilities

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.002/call via x402 USDC or a card key (/credits), first 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

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
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

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the readOnly/destructive annotations it discloses real operational behavior: input caps (pattern 300 chars, text 5,000), a ReDoS guard that refuses nested quantifiers like (a+)+ and does not charge for the refusal, and per-call pricing with the first 10 free. The note that repeats are charged is consistent with idempotentHint=false, and the safe-read claim matches readOnlyHint=true.

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?

Behavior is front-loaded: capability, then limits and safety guard, then usage, then pricing. The billing sentence (x402 USDC / card key / first 10 free) is dense but earns its place as cost information; a couple of clauses could be tightened.

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 no output schema, the description carries the return-value burden and does so adequately by naming matches, index, and capture groups. It stops short of describing the exact result object structure (e.g. how groups are keyed for unnamed vs named groups), which is the only remaining gap 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.

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; the description adds length constraints on pattern and text that the schema does not state, plus a concrete example binding pattern and text. It does not add meaning for flags beyond what the schema already says (g is always added).

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 specific verb and resource (run a JavaScript regex against text) plus the return shape (every match with index and capture groups, named groups included). It is unambiguous against the text_* siblings, none of which is a regex evaluator, so an agent can select it without opening the schema.

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" supplies a clear usage context and a worked example (pattern=(\d{4})-(\d{2}), text=2026-10 and 2027-01). It does not name a when-not condition or an alternative tool, but no sibling plausibly overlaps with regex evaluation.

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