get_diagnostics
Retrieve TypeScript errors and ESLint warnings for a file. Sort results by severity and limit to the top 50 by default.
Instructions
Get TypeScript + ESLint errors and warnings for a file. ESLint results are included when ESLint is installed in the target project. Results are sorted by severity and capped at the top 50 most severe by default.
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": {
"file": "<file>"
},
"name": "get_diagnostics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Path to the file (relative to project root) | |
| limit | No | Maximum diagnostics to return, sorted by severity (default: 50, max: 500) | |
| includeEslint | No | Include ESLint diagnostics if ESLint is installed in the target project (default: true) | |
| includeSuggestions | No | Include TypeScript suggestion diagnostics such as unused locals and unused imports (default: false). |