`POST /api/commands/{word}/invoke` — resolve `word` with the supplied args and, when `ready`, return the structured `ResponsePlan` (text / html / media / affordances) acknowledging the resolved invocation; an under-specified or invalid invocation returns the resolver's `need_param` / `invalid` guidance instead (never a half-run). A resolved word with no handler on this surface is `unsupported` with HTTP 422. An unknown OR role-hidden word is a 404.
const url = 'https://example.com/api/commands/example/invoke';const options = { method: 'POST', headers: { cookie: 'supacloud_session=<supacloud_session>', 'Content-Type': 'application/json' }, body: '{"args":{"additionalProperty":"example"},"client_timezone":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/commands/example/invoke \ --header 'Content-Type: application/json' \ --cookie supacloud_session=<supacloud_session> \ --data '{ "args": { "additionalProperty": "example" }, "client_timezone": "example" }'POST /api/commands/{word}/invoke — resolve word with the supplied args and, when
ready, return the structured ResponsePlan (text / html / media / affordances)
acknowledging the resolved invocation; an under-specified or invalid invocation
returns the resolver’s need_param / invalid guidance instead (never a half-run).
A resolved word with no handler on this surface is unsupported with HTTP 422.
An unknown OR role-hidden word is a 404.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Command word or alias
Request Bodyrequired
Section titled “Request Bodyrequired”The body of POST /api/commands/{word}/resolve and .../invoke: the partial arg
bindings supplied so far (param name -> value). Absent = a bare invocation; the
resolver/invoker fills in / asks for the rest.
object
Partial argument bindings keyed by param name.
object
AUD-WIR-037 / SCG-137 — the caller’s IANA timezone (e.g. Europe/Berlin), sent
by the web terminal from the browser. Not a command param: it rides beside
args, so the descriptors and the positional binders stay unchanged. invoke
hands it to the dispatched command (schedule add reads its times in it); an
unparseable or absent zone means UTC. Ignored by resolve.
Example generated
{ "args": { "additionalProperty": "example" }, "client_timezone": "example"}Responses
Section titled “Responses”OK
The POST /api/commands/{word}/invoke body — executed (with the resolved
invocation + the rendered plan) | need_param | invalid | forbidden |
unsupported (HTTP 422).
Fully resolved + acknowledged; plan is the rendered reply.
object
A replayable command invocation (ADR §2.2): word + resolved arg bindings.
object
Resolved arg bindings (param name -> chosen value).
object
A rendered command reply (ADR §2.2). #626 chat-format inversion — text is now
NEUTRAL MARKDOWN (**bold**, `code`, …); the old html flag is gone. Each
client renders the one markdown source to its own format (the web terminal -> ANSI).
object
A surface-neutral “next action” attached to a reply (ADR §2.2 Affordance).
object
A replayable command invocation (ADR §2.2): word + resolved arg bindings.
object
Resolved arg bindings (param name -> chosen value).
object
A media artifact (ADR §2.2 Media) on the wire — source carries url XOR data.
object
The reply body in neutral markdown.
object
A selectable option for a parameter (ADR §2.2 Choice). Wire mirror of
[sc_svc_mcp::command_registry::options::Choice].
object
object
The invocation resolved but a runtime ceiling refused it (a debug on while the
workspace allow_debug ceiling is closed). Body-carried refusal — the HTTP
status stays 200, consistent with NeedParam/Invalid.
object
AUD-WIR-032 — the word resolved, but this surface has NO handler for it (a word
that needs per-surface session or wizard state). Sent with HTTP 422 so a caller
can never read it as success; surface names the surface that refused (api).
object
Example
{ "status": "executed"}Authentication required
Permission denied
No such command
The word resolved but has no handler on this surface (status: unsupported)
The POST /api/commands/{word}/invoke body — executed (with the resolved
invocation + the rendered plan) | need_param | invalid | forbidden |
unsupported (HTTP 422).
Fully resolved + acknowledged; plan is the rendered reply.
object
A replayable command invocation (ADR §2.2): word + resolved arg bindings.
object
Resolved arg bindings (param name -> chosen value).
object
A rendered command reply (ADR §2.2). #626 chat-format inversion — text is now
NEUTRAL MARKDOWN (**bold**, `code`, …); the old html flag is gone. Each
client renders the one markdown source to its own format (the web terminal -> ANSI).
object
A surface-neutral “next action” attached to a reply (ADR §2.2 Affordance).
object
A replayable command invocation (ADR §2.2): word + resolved arg bindings.
object
Resolved arg bindings (param name -> chosen value).
object
A media artifact (ADR §2.2 Media) on the wire — source carries url XOR data.
object
The reply body in neutral markdown.
object
A selectable option for a parameter (ADR §2.2 Choice). Wire mirror of
[sc_svc_mcp::command_registry::options::Choice].
object
object
The invocation resolved but a runtime ceiling refused it (a debug on while the
workspace allow_debug ceiling is closed). Body-carried refusal — the HTTP
status stays 200, consistent with NeedParam/Invalid.
object
AUD-WIR-032 — the word resolved, but this surface has NO handler for it (a word
that needs per-surface session or wizard state). Sent with HTTP 422 so a caller
can never read it as success; surface names the surface that refused (api).
object
Example
{ "status": "executed"}Structured server error