Skip to main content
Glama

Run a job through the queue

queue_run
Destructive

Starts a heavy command such as a test suite or build in a shared job queue and returns a job ID immediately, so agents can continue while the job waits for capacity and runs in isolation.

Instructions

Starts a heavy command (a test suite, a build) through the queue and returns at once with a job id; poll queue_job for its state and output. The job waits for a free slot and an open health gate, runs in a process group of its own under a run limit, and keeps running if this server exits. A test or lint check that already passed on the same clean commit is skipped (outcome skipped) unless noSkip is true. The command is a list of words and is never read by a shell. Job records are kept for 7 days.

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": {
      "label": "<label>",
      "command": "<command>"
    },
    "name": "queue_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoAbsolute path of an existing folder to run the command in. Default: the server's folder.
kindNoJob kind, in place of the one guessed from the label and command.
labelYes"<project>: <task>", such as "shop-api: unit tests".
noSkipNoRun a test or lint check even when it already passed on this commit.
commandYesThe command and its arguments, one word each, such as ["npm", "test"].
afterFixNoA note on what was fixed, to run a check that failed twice on unchanged code.
maxRunMinNoRun limit for this job in minutes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare the safety profile (destructive, open-world, non-idempotent); the description adds substantial behavior on top: immediate return with a job id, waiting on a free slot and health gate, own process group under a run limit, survival across server exit, auto-skip of already-passing checks with a 'skipped' outcome, and 7-day record retention. It also makes clear the server never shell-interprets the command, which matters for a destructive tool.

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?

Four sentences, each carrying distinct information: the primary action and return, the polling alternative, the runtime environment and durability, the skip rule, and record retention. The core action is front-loaded with no filler or restatement of the title.

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?

With no output schema, the description still tells the agent exactly what comes back (a job id) and how to obtain output later via queue_job. For a destructive, open-world, asynchronous tool it covers the async contract, durability, resource gating, and retention — everything needed to call and follow up correctly.

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 the baseline is 3, but the description earns extra credit by explaining the semantics behind noSkip and the 'skipped' outcome, and by clarifying that command is a list of words never parsed by a shell. cwd, kind, maxRunMin, and afterFix are left entirely to the schema, which is acceptable at full coverage.

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?

States a specific verb and resource — 'Starts a heavy command ... through the queue and returns at once with a job id' — and immediately distinguishes itself from the polling sibling queue_job. An agent can tell this is the enqueue/start tool and not the status tool without opening either schema.

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

Usage Guidelines4/5

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

Explicitly routes follow-up to queue_job for state and output, and scopes the tool to 'heavy' work (test suite, build), which implicitly excludes trivial commands. It also documents the skip precondition and the noSkip escape hatch. No explicit when-not-to-use statement for a non-queued execution path, but the context is clear.

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