Skip to main content
Glama

Benchline

Test a JavaScript regular expression

test_regex
Read-onlyIdempotent

Run a JavaScript regular expression against a sample and return every match, capture group, a short explanation, and an optional replacement.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesSample to search.
flagsNo
patternYesJavaScript regular expression body, without slashes.
replacementNoWhen set, the sample is replaced and returned.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
matchesYes
truncatedYes
explanationYes
replacementYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and openWorldHint=false, so the agent knows this is a safe, side-effect-free operation. The description adds one genuinely non-structured behavior – that a short explanation is generated alongside matches – but otherwise restates the schema's replacement behavior without covering edge cases such as invalid patterns, no-match results, or error handling.

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?

A single front-loaded sentence with the action verb first and the outputs enumerated in one clause. No filler, no redundancy.

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 an output schema present, the description need not explain return values, and annotations cover the safety profile. It is nearly complete for a simple four-parameter tool, the only real gap being the undocumented 'flags' parameter, which appears nowhere in description or schema.

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 coverage is 75%, so the schema carries most parameter meaning (pattern format, replacement semantics, text sample). The description reinforces 'sample' and 'optional replacement' but adds no new detail, and the 'flags' parameter is undocumented in both the description and the schema. Baseline 3 is appropriate.

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 sample') and enumerates what the run produces: matches, capture groups, an explanation, and an optional replacement. No sibling tool overlaps with regex testing, so there is no ambiguity to resolve.

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?

The purpose implies the usage context (validating or debugging a JS regex), but the description never states when to reach for this tool, any prerequisites, or when-not to use it. No alternatives exist in the sibling list, so the omission is low-cost, but guidance is only implied.

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