mirror of
https://github.com/storytold/designcraft.git
synced 2026-11-03 07:01:09 -06:00
MCP: docs name the UI-only commands precisely; app.links works headless (#62)
This commit is contained in:
@@ -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
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user