regex-check
Regex catastrophic-backtracking check, then test cases only if proven safe — Statically analyses an ECMAScript regular expression (up to 500 characters) for catastrophic backtracking (nested or overlapping quantifiers, ambiguous alternation in a loop, backreferences, lookarounds) for agents that write or accept regexes. Runs the caller's test subjects (up to 20, 1000 characters each) only when the pattern is proven polynomially bounded and the subject is short enough for t
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": "regex-check"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cases | No | Subjects to test; at most 10000 characters in total. | |
| flags | No | Flags among dgimsuy (v is reported unsupported). | |
| pattern | Yes | ECMAScript regex source, without slashes. |