Skip to main content
Glama
regexlab-mcp
by 0xmortuex

compare_engines

Run one regex pattern across Python, JavaScript, and available engines to see compile failures, behavior differences, and semantic mismatches before relying on cross-engine compatibility.

Instructions

Run one pattern in every available engine and explain where they differ.

Reports whether the pattern compiles in each engine (named-group syntax (?P vs (?, \A \Z, inline flags, atomic groups, lookbehind width, \p{..}), runs your subject plus targeted variants (trailing newline, Unicode digits, non-ASCII word, emoji, Turkish case pairs) in all engines, and lists the known semantic differences that apply to this pattern ($ and trailing newline, Unicode-aware \d \w \b, dot and line terminators, case folding). Use it when a regex has to behave the same in Python and JavaScript.

Input Schema

NameRequiredDescriptionDefault
flagsNo
patternYes
subjectYes
timeout_sNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses exactly what is checked (per-engine compile status, named-group/\A\Z/inline-flag/atomic-group/lookbehind-width support), the targeted subject variants exercised, and the semantic-difference categories reported. It does not state that the tool is non-mutating or explain what the timeout_s limit does when exceeded, which are the remaining behavioral gaps.

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?

The purpose sentence is front-loaded and the enumeration of engine differences is dense and informative rather than padded. The parenthetical variant and difference lists are long but each item earns its place by telling the agent what the output will cover.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Output schema exists, so return values need not be explained, and the description is rich about analysis dimensions. But for a 4-parameter tool with 0% schema description coverage and no annotations, leaving 'flags' and 'timeout_s' completely unexplained is a material completeness gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it largely does not. It implies what 'pattern' and 'subject' mean ('runs your subject plus targeted variants'), but 'flags' and 'timeout_s' are never mentioned, so two of four parameters carry no semantics anywhere.

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 one pattern in every available engine') plus the outcome ('explain where they differ'), which clearly separates it from siblings like test_regex (single-engine execution) and explain_regex (pattern explanation). An agent can pick this tool without opening a schema.

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 explicit when-to-use guidance: 'Use it when a regex has to behave the same in Python and JavaScript.' It does not, however, name the alternative tools (e.g. test_regex or convert_pattern) or state when this is overkill, so the routing is clear but not fully differentiated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.