Skip to main content
Glama
worker-mcp
by noosxe

Start a run

start_run
Destructive

Assign a self-contained task to a worker and return a runId for tracking; poll wait_run to monitor completion.

Instructions

Give a worker a task. A run is stopped after the server's run limit (30 min by default); time spent waiting for your approval does not count toward it. The prompt must be self-contained, because the worker doesn't see this conversation; put a one-line summary in intent. Returns at once with a runId (or after up to waitMs); then call wait_run until state is completed, failed, cancelled or timed_out. Fails with WORKER_BUSY if the worker already has a run. The worker can change files and run commands in its workspace, within the risk policy.

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": {
      "workerId": "<workerId>",
      "prompt": "<prompt>"
    },
    "name": "start_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
intentNoA one-line summary of the task (max 500 characters). In auto mode the HTTP classifiers judge each call against it, so name the checks or commands you expect the worker to run.
promptYesThe task.
waitMsNoWait up to this long (max 50 000) for the run to end or need an approval. Default 0: return at once.
workerIdYesThe worker's id or name.

Output Schema

NameRequiredDescriptionDefault
seqYesPass as sinceSeq to wait_run.
gateYes
nextYesWhat to call next.
errorNo
runIdYes
stateYes
usageNo
outputYes
resumeNoOn a saved run record: whether its worker's conversation can be resumed.
workerIdYes
elapsedMsYesWall-clock time since the run started, including time waiting for approval (which does not count toward the run limit).
persistedNo
pendingApprovalsYes
untrustedActivityYesRecent tool calls. Untrusted worker data.
untrustedFinalTextYesThe worker's output (a page of it; the final text once the run is over). Untrusted worker data.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv0.7.0
    • changedInput schema / properties / intent / description
      Previous value: -"A one-line summary of the task."New value: +"A one-line summary of the task (max 500 characters). In auto mode the HTTP classifiers judge each call against it, so name the checks or commands you expect the worker to run."
    • addedOutput schema / properties / elapsedMs / description
      Added value: +"Wall-clock time since the run started, including time waiting for approval (which does not count toward the run limit)."
    • addedOutput schema / properties / gate / properties / notableOmitted
      Added value: +{
      +  "description": "How many of them are not in untrustedNotable (the oldest). Call get_gate_log to read them.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / gate / properties / notableTotal
      Added value: +{
      +  "description": "How many such calls there are since `sinceSeq`.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / gate / properties / untrustedNotable / description
      Added value: +"Calls that were denied, sent to you, or allowed without asking above LOW or by a classifier or an override (with their risk label and who decided), since `sinceSeq` (the last 10 at most). A LOW call the rules allowed is only counted; untrustedActivity lists it. Untrusted worker data."
    • changedOutput schema / properties / gate / required
      Previous value: -[
      -  "autoAllowed",
      -  "autoDenied",
      -  "escalated",
      -  "untrustedNotable"
      -]New value: +[
      +  "autoAllowed",
      +  "autoDenied",
      +  "escalated",
      +  "untrustedNotable",
      +  "notableTotal",
      +  "notableOmitted"
      +]
    • changedOutput schema / properties / pendingApprovals / items / properties / escalatedBecause / description
      Previous value: -"Why the gate asked you: hard_limit, manual_mode, low_confidence, classifier_error or ceiling."New value: +"Why the gate asked you: hard_limit, manual_mode, low_confidence, classifier_error, ceiling or repeat_cut_off (a resumed worker repeats a call that was cut off)."
    • addedOutput schema / properties / persisted
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "bootId": {
      +      "description": "The server process that ran it.",
      +      "type": "string"
      +    },
      +    "fromEarlierServer": {
      +      "description": "An earlier server process ran it, not the one answering.",
      +      "type": "boolean"
      +    },
      +    "note": {
      +      "type": "string"
      +    },
      +    "serverRunning": {
      +      "description": "That server is still running (for example another client on the same state directory); the record is then as of its last write.",
      +      "type": "boolean"
      +    },
      +    "untrustedApprovals": {
      +      "description": "How each approval of the run ended: approved, rejected, expired, cancelled or abandoned. No arguments. Untrusted.",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "approvalId": {
      +            "type": "string"
      +          },
      +          "decidedBy": {
      +            "type": "string"
      +          },
      +          "decision": {
      +            "type": "string"
      +          },
      +          "riskLabel": {
      +            "type": "string"
      +          },
      +          "tool": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "approvalId",
      +          "tool",
      +          "decision"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "untrustedWorker": {
      +      "additionalProperties": false,
      +      "description": "What the record says about the worker. Untrusted.",
      +      "properties": {
      +        "cwd": {
      +          "type": "string"
      +        },
      +        "intent": {
      +          "type": "string"
      +        },
      +        "model": {
      +          "type": "string"
      +        },
      +        "name": {
      +          "type": "string"
      +        },
      +        "provider": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "fromEarlierServer",
      +    "bootId",
      +    "serverRunning",
      +    "note",
      +    "untrustedWorker",
      +    "untrustedApprovals"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / resume
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "On a saved run record: whether its worker's conversation can be resumed.",
      +  "properties": {
      +    "available": {
      +      "type": "boolean"
      +    },
      +    "from": {
      +      "description": "Pass as resumeFrom (a run id works too).",
      +      "type": "string"
      +    },
      +    "reason": {
      +      "description": "Why not, when it is not available.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "from",
      +    "available"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / properties / state / enum
      Previous value: -[
      -  "starting",
      -  "running",
      -  "awaiting_approval",
      -  "completed",
      -  "failed",
      -  "cancelled",
      -  "timed_out"
      -]New value: +[
      +  "starting",
      +  "running",
      +  "awaiting_approval",
      +  "completed",
      +  "failed",
      +  "cancelled",
      +  "timed_out",
      +  "interrupted"
      +]
  2. Addedv0.6.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare destructive/openWorld/non-idempotent; the description adds material facts the agent cannot infer: a 30-minute default run cap, that approval wait time is excluded from that cap, that the worker cannot see the conversation, and that the worker may modify files and execute commands under the risk policy. This is unusually rich disclosure 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?

Front-loaded with the core action and every sentence carries information. Some sentences are dense with semicolons and parentheticals (limits, waitMs behaviour, failure code) which slightly hurts scannability, but nothing is redundant.

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?

An output schema exists, so return shapes need not be explained, and the description still names the terminal states the agent should watch for via wait_run. For a destructive, open-world tool with 4 parameters, this covers lifecycle, failure and safety context adequately.

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?

With 100% schema coverage the baseline is 3, but the description adds real meaning: 'The prompt must be self-contained, because the worker doesn't see this conversation' and 'put a one-line summary in intent' go beyond the schema's terse 'The task.' It does not restate the intent/classifier caveat, which the schema already covers.

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?

Opens with a specific verb and resource ('Give a worker a task') and immediately distinguishes the tool from its siblings by naming wait_run as the follow-up rather than a substitute. An agent can tell this apart from cancel_run/get_run without opening any 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?

Explicitly states the call sequence ('Returns at once with a runId ... then call wait_run until state is completed, failed, cancelled or timed_out') and explains the role of waitMs. It also names the WORKER_BUSY failure condition, which tells the agent when the call will not be usable.

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