Skip to main content
Glama

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

NameRequiredDescriptionDefault
pathsYesadapter:// paths of the files the action runs on (one storage)
actionYesthe action's id (the id field app_actions answers)
paramsNothe 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
pluginYesthe app's name (the plugin field app_actions answers)

Output Schema

NameRequiredDescriptionDefault
resultYesthe operation's JSON answer - the body its REST twin under /api/ai answers (an object)
statusYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full load and does: it discloses the authorization rules evaluated per file (role, grants, app permissions, admin restrictions), the async contract (queued job, 202, {op:{id,...}}), the terminal statuses, and the cancellation path. That is unusually rich behavioral context for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The key behavior (what it runs and the params-vs-form rule) is front-loaded and every sentence carries information, but the long parenthetical sentences and stacked clauses make it denser than necessary; the trailing restriction sentence would read better separated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-parameter async mutation tool with an output schema, the description covers the workflow end to end—selection, form discovery, queuing, polling, cancellation, and the case where the tool cannot be used—leaving nothing essential for the agent to infer.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema already documents each field, so the baseline is 3; the description earns one more by explaining the non-obvious semantics of omission versus {} for params and by tying action/plugin to the values app_actions returns.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening clause states a specific verb and resource (run an app action on files) and ties the plugin/action inputs to the sibling tool app_actions, so an agent can distinguish this from app_actions itself without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It spells out both invocation modes and when each applies: omit params for a form-bearing action, pass {} for an action without a form, pass real fields to actually queue. It also names the follow-up tools (op_get, op_cancel) and states an explicit exclusion—actions an app starts itself in its own flow cannot be run here.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.