analyze_file
analyze_fileAnalyze a source code file to extract symbols, imports, exports, and code metrics, with optional AST for deeper structural understanding.
Instructions
Perform a comprehensive analysis of a source code file. Returns symbols, imports, exports, and code metrics. Optionally includes the full AST.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path to the file to analyze | |
| include_ast | No | Include full AST in response (default: false, can be verbose) | |
| ast_max_depth | No | Maximum depth for AST if included (default: 5) | |
| ast_max_nodes | No | Maximum AST nodes if included (default: 10000) | |
| include_chunks | No | Include text chunks for fallback parsing (default: false) | |
| redact_secrets | No | Redact common secrets in structured source fields (default: true) | |
| include_exports | No | Include export statements (default: true) | |
| include_imports | No | Include import statements (default: true) | |
| include_symbols | No | Include extracted symbols (default: true) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| meta | Yes | ||
| error | No | ||
| message | No | ||
| success | Yes | ||
| schema_version | Yes |