Run a widget's action

POST https://runix.chat/api/v1/armada/plugins/{install_id}/actions

Run an action of one of a plugin's widgets that calls one of the plugin's tools: Armada calls the tool on the plugin's MCP endpoint for the user, who is named in the call's _meta as armada/user. An action that cannot be undone declares confirm, and runs only with confirmed. An action that asks the agent, or opens a page, is the client's to do.

Guests and bots cannot use this endpoint.

Changes: New in Zulip 13.0 (feature level ZF-0be29a).

Usage examples

The -u line implements HTTP Basic authentication. See the Authorization header documentation for how to get those credentials for users and bots.

curl -sSX POST https://runix.chat/api/v1/armada/plugins/1/actions \
    -u EMAIL_ADDRESS:API_KEY \
    --data-urlencode widget=gpus \
    --data-urlencode link_id=3 \
    --data-urlencode item= \
    --data-urlencode row=nlscale-c \
    --data-urlencode index=0 \
    --data-urlencode confirmed=true

Parameters

install_id integer required in path

Example: 1

The ID of the plugin's install.


widget string required

Example: "gpus"

The widget's key.


item string optional

Example: ""

The row key a widget was opened from, if it was.

Defaults to "".


row string optional

Example: "nlscale-c"

The key of the row whose action this is.


index integer optional

Example: 0

For one of the document's own actions, its index.


confirmed boolean optional

Example: true

Whether the user confirmed an action that declares confirm.

Defaults to false.


Response

Return values

  • text: string

    What the tool said, as text.

  • is_error: boolean

    Whether the tool reported a failure.

Example response(s)

Changes: As of Zulip 7.0 (feature level 167), if any parameters sent in the request are not supported by this endpoint, a successful JSON response will include an ignored_parameters_unsupported array.

A typical successful JSON response may look like:

{
    "is_error": false,
    "msg": "",
    "result": "success",
    "text": "Ended."
}