From 79f9d56cef82b2fe9861a12865cfa7d414e26f12 Mon Sep 17 00:00:00 2001 From: aiongg Date: Thu, 8 Oct 2026 01:33:45 -0400 Subject: [PATCH] MCP: docs name the UI-only commands precisely; app.links works headless (#62) --- crates/mcp/src/tools.rs | 3 ++- docs/mcp.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/mcp/src/tools.rs b/crates/mcp/src/tools.rs index 9b9869872..754d751f0 100644 --- a/crates/mcp/src/tools.rs +++ b/crates/mcp/src/tools.rs @@ -106,7 +106,8 @@ pub fn tool_definitions() -> Vec { "Run any DesignCraft command by id with JSON params (ids and params from list_commands). Examples: \ {\"command\":\"frame.create\",\"params\":{\"rect\":[36,36,576,300],\"content\":\"text\",\"text\":\"Hello\"}} → {id, story}; \ {\"command\":\"type.char\",\"params\":{\"size\":24}}; {\"command\":\"edit.undo\"}. Coordinates are points in spread space. \ - In the desktop app UI-only commands (view.*, window.*, app.*) work too.", + In the desktop app the UI-only commands (view.*, window.*, help.*, edit.dynamicSpelling, and app.* except app.links, \ + which works everywhere) work too.", obj(json!({"command": string("Command id, e.g. frame.create"), "params": params_schema()}), &["command"]), false, ), diff --git a/docs/mcp.md b/docs/mcp.md index 29aeff5f8..f53c56767 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -31,7 +31,7 @@ Other MCP clients use the same command line, e.g. in a JSON config: | Engine | In-process `designcraft_engine::Session`, starts with an empty Letter document (`--sample` opens the sample magazine) | The app's session, through its loopback control channel ([control-protocol.md](control-protocol.md)) | | Rendering | `designcraft-render` (CPU) | The app's renderer | | Window tools (`screenshot`, `click`, `drag`, `menu_list`, `ui_inspect`, `ui_set`, `dialog_*`) | Return an error explaining how to connect | Work | -| UI-only commands (`view.*`, `window.*`, `app.*`) via `execute` | Error | Work | +| UI-only commands via `execute` (`view.*`, `window.*`, `help.*`, `edit.dynamicSpelling`, and `app.*` except `app.links`) | Error | Work | In connected mode every tool maps to a control-channel method (`engine.execute`, `ui.render`, `ui.pointer`, …), so what the agent does shows up live in the window. The connection is re-established once if the app restarts.