Skip to main content
Glama

Alomo: Developer utilities

Regex tester (JavaScript regular expressions)

regex_tester
Read-onlyIdempotent

Tests a JavaScript regular expression against text: whether it matches, each match with its index, numbered and named capture groups, and optionally a replace preview ($1, $ references). Supports flags d, g, i, m, s, u, v, y. Patterns prone to catastrophic backtracking, such as (a+)+, are refused; text up to 20,000 characters, up to 200 matches listed.

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_tester"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesText to test (up to 20,000 characters).
flagsNoFlags such as 'gi' (default 'g').
patternYesThe regex source without slashes, e.g. '(\\d{4})-(\\d{2})'.
replacementNoOptional replacement string for a replace preview.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already establish readOnlyHint=true, idempotentHint=true, destructiveHint=false, so the safety profile is covered. The description adds genuinely useful behavior beyond the annotations: a backtracking guard that rejects patterns like (a+)+, a 20,000-character input limit, and a 200-match cap, so the agent knows how limits appear. It is a reasonable level of added context for a read-only, local, deterministic tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One dense but well-structured sentence pair: purpose and outputs first, then flags, then guardrail and limits. Every clause carries an operational fact (flags, limits, refusal rule) with no filler.

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?

There is no output schema, so the description carries the burden of describing the response, and it does: match status, per-match indices, numbered and named groups, replace preview. Limits and refusal behavior are also covered, leaving nothing an agent needs before calling it.

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; the description still adds value by listing the supported flags (d, g, i, m, s, u, v, y) and by explaining that replacement uses $1 and $<name> references, which the schema only calls 'optional replacement string'. It adds enough meaning beyond the schema to earn a 4.

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 ('Tests a JavaScript regular expression against text') and enumerates exactly what the result contains: match/no-match, each match with index, numbered and named capture groups, and an optional replace preview. Nothing in the sibling list overlaps, so an agent can select it on the description alone.

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?

The description makes the scope of use clear (JS regex testing, with an optional replace preview enabled by supplying a replacement) and it names the conditions under which the tool declines to run, namely catastrophic-backtracking patterns. It does not state a 'use X instead' alternative, but no sibling competes for this job.

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