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).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"pattern": "<pattern>"
},
"name": "analyze_matrix"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| engines | No | ||
| pattern | Yes | ||
| negatives | No | ||
| positives | No | ||
| timeout_ms | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||