test_pattern
Test a regex pattern against sample code to identify match details, positions, and text for debugging custom vulnerability patterns.
Instructions
Test a regex pattern against sample code. Returns match details including positions and matched text. Useful for developing and debugging custom vulnerability patterns.
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": {
"regex": "<regex>",
"sample": "<sample>"
},
"name": "test_pattern"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| regex | Yes | The regex pattern to test. | |
| sample | Yes | Sample code to test against. | |
| language | No | Optional language context for the pattern. |