Diagnose runtime
diagnose_runtimeRun a comprehensive probe of the Inkscape runtime to return an updated capability matrix, including version, actions, and tool registry, after environment changes.
Instructions
Probe the local Inkscape + Python runtime fresh and return the capability matrix.
When to use: to FORCE a fresh probe (e.g. after installing Inkscape/fonts). For a cheap cached
read use list_capabilities; for live-transport detail use check_live_support.
Key params: none. Re-runs the probe every call and refreshes the cache that list_capabilities
and inkscape://runtime/capabilities serve.
Return shape: Capabilities — Inkscape version, available actions, export formats, data dirs,
inkex, DBus/live transport availability, fonts, the curated intents map, and the authoritative
MCP tool surface (tool_count + tools: name + one-line purpose + risk class, from the live
registry). Missing backends are reported in notes, never crashed.
Example: diagnose_runtime()
Risk class: low (read-only probe).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | No | Human-readable degradation messages (e.g. 'inkscape not found'). | |
| tools | No | The authoritative MCP tool surface: each entry is {name, purpose, risk}, sourced from the live FastMCP registry. Counts only `@mcp.tool`s (not resources or prompts). Populated by the tools/system layer before serving; empty on a raw probe. | |
| actions | No | Action ids from `inkscape --action-list` (enumeration only; not executable). | |
| intents | No | Curated natural-language goal → tool(s) map: each entry is {goal_pattern, tools, how_to, group}. The same data the read-only `how_do_i` tool matches against; surfaced here so an agent can browse the whole map. Guidance only — executes nothing, no raw-action hatch (ADR-003). Host-independent (not probed). | |
| probed_at | Yes | UTC ISO-8601 timestamp of when this probe ran. | |
| font_count | No | Font faces reported by `fc-list` (0 ⇒ fontconfig broken/absent). | |
| inkex_path | No | Path to bundled `inkex/__init__.py`, or null if not found. | |
| tool_count | No | Authoritative number of registered `@mcp.tool`s. Equals `len(tools)` and the live `mcp.list_tools()` count — one unambiguous number so agents stop deriving it. Populated from the live FastMCP registry, not probed from Inkscape. | |
| export_types | No | Export-type tokens parsed from the `--export-type=` list in inkscape --help. | |
| inkex_version | No | `__version__` read from inkex sources (NOT imported), or null if unknown. | |
| meets_minimum | No | Whether the detected version is >= MINIMUM_VERSION (1, 3, 0). | |
| user_data_dir | No | Inkscape user data directory (`--user-data-directory`). | |
| python_version | Yes | Interpreter version running this server. | |
| inkscape_binary | No | Absolute path to the Inkscape binary, or null if absent. | |
| system_data_dir | No | Inkscape system data directory (`--system-data-directory`). | |
| dbus_session_bus | No | Whether DBUS_SESSION_BUS_ADDRESS is set (session bus present). | |
| has_path_actions | No | Whether any `path-*` action is present. | |
| inkscape_version | No | Raw version string reported by `inkscape --version`. | |
| has_export_actions | No | Whether any `export-*` action is present. | |
| has_object_actions | No | Whether any `object-*` action is present. | |
| has_select_actions | No | Whether any `select*` action is present. | |
| inkscape_available | Yes | Whether an Inkscape binary was found and ran. | |
| shell_mode_available | No | Whether `inkscape --shell` (the headless shell engine/ADR-007) can run here. True when an Inkscape binary is present (shell mode ships on all supported 1.x). Whether the warm engine is USED is the separate INKSCAPE_MCP_ENGINE_MODE gate. | |
| dbus_inkscape_present | No | Whether an `org.inkscape.Inkscape*` name is on the session bus right now. | |
| inkscape_version_tuple | No | Parsed (major, minor, patch) version, or null if unparsable. | |
| live_extension_socket_available | No | Whether the live helper extension is installed under a data dir (unshipped). |