astgrep_analyze
Analyze and debug code structure using AST patterns to identify issues, specify a programming language, and optionally enable detailed query or tree context analysis within a secure sandboxed environment.
Instructions
AST structure analysis and debugging using ast-grep
Input Schema
Name | Required | Description | Default |
---|---|---|---|
debugQuery | No | Enable debug mode for query analysis | |
language | No | Programming language | |
pattern | Yes | AST pattern to analyze | |
showFullTree | No | Show full AST tree context | |
workingDirectory | No | Optional working directory for the operation (defaults to server working directory) |
Input Schema (JSON Schema)
{
"properties": {
"debugQuery": {
"description": "Enable debug mode for query analysis",
"type": "boolean"
},
"language": {
"description": "Programming language",
"type": "string"
},
"pattern": {
"description": "AST pattern to analyze",
"type": "string"
},
"showFullTree": {
"description": "Show full AST tree context",
"type": "boolean"
},
"workingDirectory": {
"description": "Optional working directory for the operation (defaults to server working directory)",
"type": "string"
}
},
"required": [
"pattern"
],
"type": "object"
}