Skip to main content
Glama

regex-tester

Read-onlyIdempotent

Test a JavaScript regex against text. Returns all matches with their positions, captured groups, and named groups. Defaults to global flag so all occurrences are found.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe text to test against.
flagsNoRegex flags. Allowed: g, i, m, s, u, y. Defaults to 'g'.
patternYesThe regex pattern, without delimiters. Standard JavaScript regex syntax.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
flagsYesFlags used.
matchesYesFirst 100 matches with positions and captured groups.
patternYesRegex pattern, echoed back.
truncatedYesTrue if more than 100 matches were truncated.
match_countYesTotal number of matches found.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

The description adds valuable behavioral context beyond the annotations: it discloses that all matches are returned with positions, captured groups, and named groups, and that the global flag is default so all occurrences are found. This complements the readOnlyHint and idempotentHint annotations without contradicting them.

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?

The description is two concise sentences with no redundant content. It front-loads the core purpose and immediately follows with output specifics and default behavior—every sentence carries useful information.

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?

Given that an output schema exists and annotations declare the tool as read-only and idempotent, the description sufficiently covers what the agent needs: the tool's purpose, the nature of its output, and a critical default behavior. No significant gaps remain for correct selection and invocation.

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?

The input schema provides 100% coverage of parameter descriptions, so the baseline is 3. The description's mention of 'defaults to global flag' simply restates what the schema already documents for the 'flags' parameter, and no additional syntactic or format details are offered beyond 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?

The description opens with 'Test a JavaScript regex against text', which uses a specific verb and resource, immediately clarifying the tool's function. It further distinguishes itself by detailing outputs (matches, positions, captured groups, named groups) and the default global-flag behavior, separating it from any potential generic 'regex' tool.

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 clearly implies when to use the tool: whenever a JavaScript regex needs to be tested against text. There are no direct sibling tools that compete, and the note about defaulting to the global flag sets expectations for how results will behave, though it stops short of explicitly stating alternatives or exclusions.

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.

TDQS

A3.9/5.0
Disambiguation4/5

Most tools have distinct purposes. However, 'hex-to-rgb' is redundant with 'color-converter', which already handles hex-to-RGB conversion, causing potential confusion.

Naming Consistency4/5

Names follow a consistent lowercase-with-hyphens style, but vary in pattern (e.g., 'angle-converter', 'average-calculator', 'dedup-lines'). One tool ('internal-do-not-call') deviates from the descriptive norm.

Tool Count2/5

With 46 tools, the server is heavily populated. Many converters could be merged into a generic unit converter, and there is redundancy, making the surface unnecessarily large for a single server.

Completeness4/5

The server covers a broad range of utility domains: converters, text processing, math, cryptography, etc. Minor redundancies exist (e.g., hex-to-rgb vs color-converter), but the set is otherwise comprehensive.

Resources