Skip to main content
Glama

run_task

Run trusted, stored per-language commands for build, lint, test, e2e, or verify tasks. Executes only the user-saved command from project or global config, without shell access, for the primary or specified language.

Instructions

Run a stored per-language task command — build, lint, test, e2e, verify, or a project-defined slot — configured in [tasks.]. It executes only the command the user saved (no shell, no agent-supplied command line), for this workspace's primary language or the one you name in language. Commands run from the workspace root, or from [tasks.] working_dir when the module lives in a subdirectory. A project-supplied (.plumb/config.toml) command must be trusted first (run plumb trust); the shipped defaults and global-config commands always run. Output and runtime are bounded. Pairs with topology_affected (which says WHICH tests to run; this runs them).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slotNoWhich stored task command to run: build, lint, test, e2e, verify, or a project-defined slot under [tasks.<lang>]. session_start lists what's configured; an unconfigured slot is refused with that list.
targetNoOptional target substituted for a {target} token in the stored command (e.g. one test name or package). Restricted to one shell-safe argument ([A-Za-z0-9._/:@-]); refused if the command has no {target} slot.
languageNoWhich [tasks.<language>] block to run, for a polyglot repo whose other languages are not the primary. Omit for the primary. A language with no commands is refused, naming those that have them.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.18.0
    • addedInput schema / properties / language
      Added value: +{
      +  "description": "Which [tasks.<language>] block to run, for a polyglot repo whose other languages are not the primary. Omit for the primary. A language with no commands is refused, naming those that have them.",
      +  "type": "string"
      +}
    • changedInput schema / properties / target / description
      Previous value: -"Optional target substituted for a {target} token in the stored command (e.g. a single test name or package). The shipped go/python/rust test defaults carry a defaulted placeholder ({target:./...}), so scoping works with no config edit and omitting the target still runs everything. Restricted to one shell-safe argument ([A-Za-z0-9._/:@-]); refused if the command has no {target} slot."New value: +"Optional target substituted for a {target} token in the stored command (e.g. one test name or package). Restricted to one shell-safe argument ([A-Za-z0-9._/:@-]); refused if the command has no {target} slot."
  2. Changed1 schema field changedv0.17.7
    • changedInput schema / properties / target / description
      Previous value: -"Optional target substituted for a {target} token in the stored command (e.g. a single test name or package). The shipped go/python/rust test defaults carry a defaulted placeholder ({target:./...}), so scoping works with no config edit and omitting the target still runs everything. Restricted to one shell-safe argument ([A-Za-z0-9._/:@-]); refused if the stored command has no {target}."New value: +"Optional target substituted for a {target} token in the stored command (e.g. a single test name or package). The shipped go/python/rust test defaults carry a defaulted placeholder ({target:./...}), so scoping works with no config edit and omitting the target still runs everything. Restricted to one shell-safe argument ([A-Za-z0-9._/:@-]); refused if the command has no {target} slot."
  3. Changed2 schema fields changedv0.17.2
    • changedInput schema / properties / slot / description
      Previous value: -"Which stored task command to run: build, lint, test, e2e (integration), or verify (build then test). The command is configured per language in [tasks.<lang>] and resolved for this workspace's language — you cannot pass an arbitrary command."New value: +"Which stored task command to run: build, lint, test, e2e, verify, or a project-defined slot under [tasks.<lang>]. session_start lists what's configured; an unconfigured slot is refused with that list."
    • removedInput schema / properties / slot / enum
      Removed value: -[
      -  "build",
      -  "lint",
      -  "test",
      -  "e2e",
      -  "verify"
      -]
  4. Changed1 schema field changedv0.17.0
    • changedInput schema / properties / target / description
      Previous value: -"Optional target substituted for a literal {target} token in the stored command (e.g. a single test name or package). Restricted to one shell-safe argument ([A-Za-z0-9._/:@-]); refused if the stored command has no {target}."New value: +"Optional target substituted for a {target} token in the stored command (e.g. a single test name or package). The shipped go/python/rust test defaults carry a defaulted placeholder ({target:./...}), so scoping works with no config edit and omitting the target still runs everything. Restricted to one shell-safe argument ([A-Za-z0-9._/:@-]); refused if the stored command has no {target}."
  5. First observedv0.16.6

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 burden, and it delivers: it discloses that only saved commands execute, that no shell or agent-supplied command is used, that working directory behavior is configurable, that commands must be trusted, and that output/runtime are bounded. It also exposes failure modes like refusal for unconfigured slots and unsafe targets.

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

Conciseness5/5

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

The description is dense but every sentence earns its place: purpose, security model, working directory, trust requirement, output bounds, and sibling relationship. The core action is front-loaded, followed by constraints and the topology_affected pairing.

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

Completeness4/5

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

For a tool with no output schema and no annotations, this description is nearly complete: it explains invocation, parameter semantics, failure refusals, trust requirements, and the relationship to topology_affected. The only gap is that 'output and runtime are bounded' is vague about the actual limits, but this does not prevent correct selection and invocation.

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%, so baseline is 3. The description adds material behavior beyond the schema: slot values map to stored configuration, target is a substituted {target} token restricted to one shell-safe argument and refused if no such token exists, and language omission selects the primary. These operational details justify a 4.

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 description opens with a specific verb and resource: 'Run a stored per-language task command' with an explicit enumerated list of slots. It also distinguishes the tool from generic shell execution ('no shell, no agent-supplied command line') and from topology_affected, making its role unmistakable.

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?

The description explicitly pairs this tool with topology_affected ('which says WHICH tests to run; this runs them') and states when to omit language vs. name it. It also gives actionable constraints: trust project-supplied commands first, session_start lists configured slots, and unconfigured slots are refused.

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