regex-quality
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| gen_evilB | Generate an adversarial string that pumps pattern and then fails to match, forcing maximal backtracking. Returns the evil string and whether it fails to match (a timeout counts as failing -- it's the vulnerability). |
| gen_benignC | Generate a minimal string that pattern matches quickly (the baseline). |
| redos_benchA | Time the evil vs benign string AND sweep increasing pump sizes to classify growth as linear / polynomial / exponential. The verdict names the engine. |
| re2_memoryB | Sweep RE2 max_mem to find the DFA compile-memory cliff: the largest cap at which compilation fails and the smallest at which it succeeds. |
| test_casesA | Check pattern matches all positives and rejects all negatives (each in a killable subprocess). Returns pass plus any false positives/negatives. |
| analyzeA | Composite verdict: accept pattern only if it (a) passes all test cases, (b) shows no super-linear NFA growth on the engine, and (c) compiles within the RE2 memory bound. On rejection, names the dangerous construct and the family of safe rewrites to try. Does not auto-rewrite. |
| suggest_rewritesA | Mechanically generate safe-rewrite CANDIDATES for a ReDoS-prone pattern and
return only the ones that are VERIFIED. Use this when Each candidate is independently checked: correctness on your positives/
negatives, non-super-linear growth on |
| fix_until_safeA | Drive
|
| analyze_matrixA | 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 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 9 tools
Most tools serve distinct purposes: generation, benchmarking, memory, testing, analysis, rewriting, and fixing. However, analyze, analyze_matrix, and redos_bench all involve growth classification and could be confused by an agent; detailed descriptions mitigate but don't eliminate the overlap.
Naming mixes verb-led patterns (gen_benign, suggest_rewrites, analyze_matrix) with noun-phrases (redos_bench, re2_memory, test_cases) and a bare verb (analyze). All names are snake_case and descriptive, but the pattern is not uniform.
9 tools cover the full workflow of regex safety: generation, benchmarking, memory analysis, correctness testing, composite analysis, rewrite suggestion, and automated fixing. Each tool earns its place with a distinct function.
The server provides end-to-end coverage from generating attack strings to verifying safe rewrites, including multi-engine classification. No obvious dead ends; fix_until_safe offers a guaranteed outcome or honest failure.