Skip to main content
Glama
XlogicX

regex-quality

by XlogicX

analyze_matrix

Classify NFA growth for a regex across multiple engines to determine safe deployment. Returns per-engine verdicts highlighting backtracking vs automaton behavior.

Instructions

Classify NFA growth for one pattern across MULTIPLE regex engines and return a per-engine matrix. Use this to decide whether a pattern is safe on the engine you actually deploy on -- the same regex can be exponential on a backtracking engine (Python re/regex, Node/V8, PCRE2, Java) yet linear on an automaton engine (RE2, Go).

Every requested engine appears in per_engine: installed ones with a measured growth verdict + curve, missing ones with available=false and a skipped_reason (never silently omitted). DFA/memory analysis runs once (engine-independent); correctness runs once on a reference engine. overall_accepted is true only if the pattern is safe on every requested engine that is available AND none were unavailable; otherwise the result is honestly unverified. Default engines covers the whole registry (python, regex, re2, node, go, java, pcre2).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
enginesNo
patternYes
negativesNo
positivesNo
timeout_msNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It reveals that missing engines appear with available=false and a skipped_reason (never silently omitted), that overall_accepted is true only under strict conditions (otherwise honestly 'unverified'), and that DFA/memory and correctness runs are deduplicated. This is rich, non-obvious behavioral detail.

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 first sentence is a clear, front-loaded summary. The following paragraphs are logically organized into usage context, per-engine behavior, and overall acceptance logic. Every sentence adds value and there is 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?

Given the tool's complexity and the presence of an output schema, the description explains engine defaults, availability handling, and overall_accepted logic well. However, key input parameters (positives, negatives, timeout_ms) are left undefined, leaving a modest 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?

The schema has 0% description coverage, so the description must compensate. It clarifies the engines parameter's null/default behavior (whole registry) and explains result semantics. However, it does not define the positives, negatives, or timeout_ms parameters, leaving critical input semantics ambiguous. Compensation is only partial.

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 a specific verb ('Classify NFA growth') and clearly scopes the tool to one pattern across multiple regex engines, returning a per-engine matrix. This distinguishes it from sibling tools like gen_benign/gen_evil and analyze, and the use case ('decide whether a pattern is safe on the engine you actually deploy on') reinforces its purpose.

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?

Explicitly states when to use the tool: 'Use this to decide whether a pattern is safe on the engine you actually deploy on'. It contrasts backtracking vs automaton engines, giving clear context. It does not explicitly name alternative sibling tools, so it stops short of a 5, but the usage context is unambiguous.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/XlogicX/ReDetox'

If you have feedback or need assistance with the MCP directory API, please join our Discord server