Run local static analysis
run_static_analysisRun local static analyzers (ast-grep, Semgrep, or CodeQL) on project paths with fixed safe arguments, timeouts, and output caps to detect code issues without executing project scripts or remote rules.
Instructions
Optionally run an installed local ast-grep, Semgrep, or CodeQL analyzer with fixed non-shell arguments, strict path bounds, timeouts, output caps, and redaction. Disabled by default; no project scripts or remote rules are executed.
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": {
"backend": "<backend>"
},
"name": "run_static_analysis"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | No | ||
| backend | Yes | ||
| pattern | No | ||
| database | No | ||
| language | No | ||
| directory | No | ||
| rule_file | No | Existing project-relative ast-grep or Semgrep rule file | |
| query_file | No | ||
| timeout_ms | No | ||
| max_results | No | ||
| redact_secrets | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| meta | Yes | ||
| error | No | ||
| message | No | ||
| success | Yes | ||
| schema_version | Yes |