code_nav.structural_search
Search code using abstract syntax tree (AST) patterns via ast-grep. Provide a pattern and target language to locate matching code constructs.
Instructions
AST/code-shape search using ast-grep or sg.
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>",
"language": "<language>"
},
"name": "code_nav.structural_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | ||
| language | Yes | ||
| scope | No | ||
| limit | No |