Skip to main content
POST
Error

Authorizations

Authorization
string
header
required

The control surface credential. Send Authorization: Bearer <token>.

Two kinds of token are accepted and they are told apart by shape, not by a separate header. A token beginning pbk_ is an org scoped API key, whose public half and secret half are generated together and of which only a hash of the secret is ever stored; anything else is treated as an OAuth 2.1 access token and verified against the authorization server's keys.

Both resolve to the same context: an org, a principal and a set of scopes. Nothing downstream branches on which channel you used, with one deliberate exception, key management, which requires a signed-in person so that a key can never mint another key.

Scopes are enforced when MCP tools are REGISTERED rather than when they are called, so a tool your credential cannot use is absent from tools/list rather than refused mid gesture.

Body

application/json

The command.

tool
string
required

The tool name, as the MCP reference spells it.

input
object

The tool's arguments, in its own published input schema.

context
CopilotContext · object

What the console knows and the sentence does not say. Every device id here must be one your session can address, or the request is 400 naming the field. Resolution order for which phone a turn is about: pinned, then mentions, then context.device, then the device this thread last acted on, then the only device you have, then a data-device-choice card. THIS BLOCK IS NOT REPLAYED: it describes where somebody is now, so it is read from this request only and never from the stored thread.

mentions
string[]

Device ids the person named with an @ in this message. The id travels, never the typed name, so renaming a phone cannot re-point a message. Exactly one names the turn's device; two or more raise the chooser.

Maximum array length: 10
threadId
string

Append the result to this thread, as a tool part. Required for a command that asks first.

Pattern: ^[A-Za-z0-9_-]{1,128}$
approvalId
string

The id from a 202 this route returned, sent with the same tool and input to run it.

Response

The tool ran. isError is the tool's own verdict, not an HTTP status: a refusal by the device is a 200 with isError true.

tool
string
required

The tool that ran.

isError
boolean
required

The tool's own verdict.

output
CopilotCommandOutput · object
required
files
object[]

Pictures the tool returned, as data: URLs, when small enough to carry inline.

threadId
string

The thread the result was appended to, when one was named.

messageId
string

The assistant message the result was written as.