Get TypeScript diagnostics
ast_get_diagnosticsRetrieve normalized TypeScript diagnostics for an entire project or a single file, with configurable limits and offsets. Get bounded error results to verify code health before applying write operations.
Instructions
Returns bounded normalized TypeScript diagnostics for a project or one source file. Existing errors are preserved as evidence for write-operation delta checks.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum results to return (1-500). | |
| offset | No | Zero-based result offset. | |
| file_path | No | Optional project-relative or absolute file path. Omit for project diagnostics. | |
| project_root | Yes | Absolute project directory containing tsconfig.json, or the config path. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | Yes | ||
| total | Yes | ||
| offset | Yes | ||
| has_more | Yes | ||
| diagnostics | Yes | ||
| duration_ms | Yes | ||
| error_count | Yes | ||
| next_offset | Yes | ||
| warning_count | Yes |