MCP: docs name the UI-only commands precisely; app.links works headless (#62)

This commit is contained in:
aiongg
2026-10-08 08:30:57 -04:00
parent 75aa5356ba
commit 79f9d56cef
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -106,7 +106,8 @@ pub fn tool_definitions() -> Vec<Value> {
"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,
),
+1 -1
View File
@@ -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.