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
Input Schema
Name | Required | Description | Default |
---|---|---|---|
file_path | No | ||
language | No | ||
max_results | No | ||
project | Yes | ||
query | Yes |
Input Schema (JSON Schema)
{
"properties": {
"file_path": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "File Path"
},
"language": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Language"
},
"max_results": {
"default": 100,
"title": "Max Results",
"type": "integer"
},
"project": {
"title": "Project",
"type": "string"
},
"query": {
"title": "Query",
"type": "string"
}
},
"required": [
"project",
"query"
],
"title": "run_queryArguments",
"type": "object"
}