run_query
Execute tree-sitter queries on project files to analyze and extract code patterns. Specify project, query, and optional file path or language for targeted results. Returns a list of matches for efficient code analysis.
Instructions
Run a tree-sitter query on project files.
Args:
project: Project name
query: Tree-sitter query string
file_path: Optional specific file to query
language: Language to use (required if file_path not provided)
max_results: Maximum number of results
Returns:
List of query matches
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": {
"project": "<project>",
"query": "<query>"
},
"name": "run_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | No | ||
| language | No | ||
| max_results | No | ||
| project | Yes | ||
| query | Yes |