Skip to main content
Glama

Regex Test

regex_test
Read-onlyIdempotent

Test a regular expression against sample strings. FREE.

Typical input {"pattern": "v(\d+)", "samples": ["v12", "beta"]} returns {"pattern": ..., "results": [{"sample": "v12", "match": true, "matched_text": "v12", "groups": ["12"]}, {"sample": "beta", "match": false, ...}], "match_count": 1}.

Use to confirm a pattern matches what you expect before shipping it. Not for validating JSON (json_validate). Errors: on invalid, missing, or malformed input this tool never raises a protocol error — it returns {"error": ""} (for example {"error": "invalid regex: "}). Every call is read-only and idempotent, so after correcting the input it is always safe to retry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternYesA Python-flavor regular expression as a string, e.g. "v(\\d+)".
samplesYesStrings to test the pattern against; only the first 50 are evaluated.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

TDQS

A4.7/5.0
Behavior5/5

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

The description goes well beyond annotations by providing rich behavioral context: error handling (returns error objects instead of raising protocol errors), return format with full examples, the fact that it is read-only and idempotent (matching but extending annotations), and scope details (only first 50 samples evaluated). There is no contradiction with the annotations.

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 concise and well-structured. It starts with a one-sentence summary, gives a compact example, explains usage context, error behavior, and idempotency. Every sentence serves a purpose (purpose, usage, error handling, safety). No wasted words.

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 the tool's moderate complexity (2 parameters, no nested objects, has output schema), the description is completely comprehensive. It covers inputs, outputs, error handling, usage guidance, and safety. The output schema exists, so return values are detailed there, but the description still provides a full example. Nothing is missing for an agent to correctly select and invoke this tool.

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 100% and both parameters have descriptions in the schema (pattern with an example, samples with a limit note). The description adds a typical usage example showing how to use them, which reinforces but does not significantly expand beyond schema information. Baseline 3 is appropriate as the schema does the heavy lifting.

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 clearly states it tests a regular expression against sample strings, using the verb 'test' and specifying the resource 'regular expression'. It provides a typical input/output example that leaves no ambiguity about what the tool does, and it distinguishes itself from sibling tools like json_validate by explicitly naming it as something else.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit guidance: 'Use to confirm a pattern matches what you expect before shipping it.' It also tells when not to use it with 'Not for validating JSON (json_validate).' It even explains behavior on errors, stating it never raises a protocol error, which informs the agent how to handle failures.

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

A4.7/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: cron explanation, text diffing, JSON validation, skill linting, packaging layout validation, and regex testing. There is no functional overlap, so an agent can easily select the correct tool.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case (e.g., cron_explain, diff_texts, lint_skill). The naming convention is uniform and predictable across the entire set.

Tool Count5/5

With only 6 tools, the server is well-scoped for its linting and validation purpose. Each tool is justified and contributes to the overall functionality without redundancy or excessive bloat.

Completeness4/5

The tool set covers the primary validation needs for skills (linting, packaging, and auxiliary utilities like cron, diff, JSON, regex). Minor gaps could include a tool for validating skill dependencies or conformance to a specific schema, but the core workflows are well-supported.

Resources