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

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: input size caps (300-char pattern, 5,000-char text), ReDoS protection that refuses nested quantifiers like (a+)+, and the pricing model (per-call charge, first 25 free, failed calls free). The cost note explains the idempotentHint=false annotation in practical terms ('each call is charged, so repeats are not free'), which is exactly the kind of value-add expected alongside annotations.

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 operation and return shape, followed by limits, use case, example, and cost. Every part is actionable, though 'Reads or computes only and changes nothing' partly restates readOnlyHint=false/destructiveHint=false and the pricing sentence is dense.

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?

With no output schema, the description carries the return contract itself ('every match with its index and capture groups'), plus limits, safety behavior, and cost. An agent has everything needed to call this correctly and to budget for repeated calls.

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 100%, so the baseline is 3, but the description adds constraints the schema omits: the 300-character pattern limit and the refusal of unsafe nested-quantifier patterns. The worked example (pattern=(\d{4})-(\d{2}), text=2026-10 and 2027-01) reinforces correct parameter pairing, though flags are left to the schema.

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?

States a specific verb and resource ('Run a JavaScript regular expression against a text') and specifies the return shape ('every match with its index and capture groups (named groups included)'). The scope is precise enough that an agent can distinguish it from generic text-extraction siblings even without an explicit sibling reference.

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?

Gives a clear use case: 'Use to check a pattern before using it in code,' which tells the agent when this tool is appropriate. It does not name alternatives (e.g. text_extract) or state when not to use it, so it falls short of a 5.

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.