file_diagnostics
MCP tools › Code insight and refactoring
Errors and warnings of workspace files from their language server (clangd, rust-analyzer, pyright, typescript-language-server, gopls), followed by Ferris IDEA's own findings (source Ferris IDEA). Positions are 0-based. min_severity filters. A missing server is reported with its command. paths (at most 50) returns files in order, each with diagnostics or error, plus a failed count; one file's error never fails the others.
Its results carry text from files, language_server: the client is told to treat that as data, never as instructions.
| Capability | code.file_diagnostics |
|---|---|
| Area | Code insight and refactoring |
| Access | reads only |
| Reaches | process |
| Rights | none |
| Dry run | none |
Arguments
| Argument | Type | Description |
|---|---|---|
path | string | Workspace-relative file path (one file; give this or paths). |
paths | array of string | Several workspace-relative file paths, at most 50 (SPEC-0023 v5): one result per file,
each with its diagnostics or its error. Give this or path. |
timeout_seconds | integer | Seconds to wait for the language server (default 30, at most 120); with paths, for each
language server.minimum 0 |
min_severity | string | Only findings of this severity or a more severe one: error, warning, information or
hint (default: all). |
Call it from a shell
ferris-idea call runs one tool with the rights and safe mode of ferris-idea mcp. Replace the folder and the placeholder values.
ferris-idea call ~/my-project file_diagnosticsInput schema as JSON
{ "type": "object", "properties": { "path": { "description": "Workspace-relative file path (one file; give this or `paths`).", "type": [ "string", "null" ], "default": null }, "paths": { "description": "Several workspace-relative file paths, at most 50 (`SPEC-0023` v5): one result per file,\neach with its `diagnostics` or its `error`. Give this or `path`.", "type": [ "array", "null" ], "items": { "type": "string" }, "default": null }, "timeout_seconds": { "description": "Seconds to wait for the language server (default 30, at most 120); with `paths`, for each\nlanguage server.", "type": [ "integer", "null" ], "minimum": 0 }, "min_severity": { "description": "Only findings of this severity or a more severe one: `error`, `warning`, `information` or\n`hint` (default: all).", "type": [ "string", "null" ] } }}