get_diagnostics
Retrieve Dart diagnostics for a project or specific file, filtered by severity. Identify errors, warnings, and hints to improve code quality.
Instructions
Get Dart diagnostics for a project or specific file.
Args: project_path: Absolute path to the Dart project root. file_path: Optional specific file to check (returns all if omitted). min_severity: Minimum severity level (error, warning, info, hint). ignore_unused_underscore: Filter out unused _xxx variable hints (default: True).
Returns: Formatted string of diagnostics.
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": {
"project_path": "<project_path>"
},
"name": "get_diagnostics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | No | ||
| min_severity | No | hint | |
| project_path | Yes | ||
| ignore_unused_underscore | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |