Skip to main content
POST
Get Diagnostics

Overview

Get real-time diagnostics (errors, warnings, and informational messages) for your Python code. This provides the same error detection you see in your IDE’s Problems panel.

Request

string
required
File URI (e.g., file:///workspace/main.py)
string
Filter by severity: error, warning, information, hint

Response

array
Array of diagnostic messages
number
Total number of errors
number
Total number of warnings

Example Request

Example Response

Diagnostic Types

Errors (Severity 1)

Warnings (Severity 2)

Information (Severity 3)

Use Cases

Pre-Commit Validation

Continuous Monitoring

Code Quality Metrics

Filtering by Severity

Get only specific severity levels:

Performance Tips

Incremental Updates: Only check files that changed, not entire workspace
Debounce Checks: Wait 500ms-1s after typing stops before checking
Cache Results: Diagnostics don’t change unless file changes

Error Responses

Rate Limits

Get Code Actions

Get quick fixes for diagnostics

Format Document

Auto-format code to fix style issues

Get Hover

Get more info about errors

Apply Workspace Edit

Apply fixes automatically