app_run
Run an app action on selected files, respecting your role, grants, and app permissions. Omit params to fetch the action's form, then pass field values to queue the job.
Instructions
Run an app action on files (plugin and action from app_actions) - the explorer's menu action, with its rules: your role and grants on each file, the app's own permissions, the actions an administrator restricted. Without params an action that has a form answers it ({surface: …}) instead of running; call again with params holding the fields' values. With params (an empty object for an action without a form) the job is queued. It answers 202 with the queued operation ({op: {id, …}}): follow it with op_get {id} until its status is ok (or partial, failed, cancelled), stop it with op_cancel. An action an app starts itself (the second half of its own flow) cannot be run from here.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"plugin": "<plugin>",
"action": "<action>",
"paths": "<paths>"
},
"name": "app_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | Yes | adapter:// paths of the files the action runs on (one storage) | |
| action | Yes | the action's id (the id field app_actions answers) | |
| params | No | the action's parameters. Omit it to get the action's form (surface) when it has one - its fields are what params takes; pass {} for an action without a form | |
| plugin | Yes | the app's name (the plugin field app_actions answers) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | the operation's JSON answer - the body its REST twin under /api/ai answers (an object) | |
| status | Yes |