Skip to main content
Glama

run_thronglet

Destructive

Runs a selected harness/model agent on a task in a working directory and returns structured or text output; supports background runs for later collection.

Instructions

Runs an agent of an installed harness (see list_harnesses) on a task in cwd and returns its final message as JSON {session_id, text, stop_reason, usage, duration_s, warnings?}; with schema, structured replaces text. description names the thronglet for listings. With background: true the call returns {session_id, state, queued} as soon as the turn runs; collect the result with wait_thronglet.

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": {
      "agent": "<agent>",
      "prompt": "<prompt>",
      "cwd": "<cwd>",
      "description": "<description>"
    },
    "name": "run_thronglet"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdYesAbsolute path; the agent works in this tree
agentYes<harness>/<model>[:<effort>], e.g. claude/opus:max, codex/gpt-6-sol:xhigh; valid values: list_harnesses
promptYesTask for the agent
schemaNoJSON Schema (draft-07 or 2020-12) for structured output: the agent ends with a matching JSON value as its final message, returned as `structured` instead of `text`
timeout_sNoWall-clock limit for the run in seconds; default from config (21600)
backgroundNoReturn as soon as the turn is running (or queued behind the session's current turn); collect the result with wait_thronglet
descriptionYesWhat this thronglet is for, in a few words; shown in session listings

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.4
    • changedInput schema / properties / schema / description
      Previous value: -"JSON Schema (draft-07 or 2020-12) for structured output: the agent submits a matching result, returned as `structured` instead of `text`"New value: +"JSON Schema (draft-07 or 2020-12) for structured output: the agent ends with a matching JSON value as its final message, returned as `structured` instead of `text`"
  2. Changed1 schema field changedv0.1.1
    • changedInput schema / properties / agent / description
      Previous value: -"<harness>/<model>[:<effort>], e.g. claude/opus[1m]:max, codex/gpt-6-sol:xhigh; valid values: list_harnesses"New value: +"<harness>/<model>[:<effort>], e.g. claude/opus:max, codex/gpt-6-sol:xhigh; valid values: list_harnesses"
  3. First observedv0.1.0

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, openWorldHint=true and non-idempotent, so the safety profile is covered structurally. The description adds real value by spelling out the JSON return shape ({session_id, text, stop_reason, usage, duration_s, warnings?}) in the absence of an output schema, and by explaining the async handoff. It does not itself warn that the agent may mutate the cwd tree or that runs can be long-lived beyond the 21600s default (that default lives only in the schema), leaving the destructive implication to annotations.

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 verb and the primary return value, with no filler sentences. The single semicolon-chained sentence is dense and slightly run-on, making the background branch easy to skim past, but every clause carries information.

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 7-parameter, nested-schema, no-output-schema tool, the description covers the return shapes for both the foreground and background paths plus the follow-up tool needed to complete the async flow. Remaining gaps are secondary: permission/approval needs and the cost or side-effect profile of running an agent in the working tree.

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, and the description genuinely adds meaning: it explains that `schema` swaps `text` for `structured`, that `background` changes the return object and requires a follow-up wait, and that `description` is surfaced in listings. It repeats rather than extends the `agent` pointer to list_harnesses.

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 ('Runs an agent of an installed harness ... on a task in cwd') plus the return contract, and points at list_harnesses for the agent identifier. An agent can distinguish it from wait_thronglet/cancel_thronglet 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 Guidelines4/5

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

Gives concrete routing: valid agent values come from list_harnesses, and with background: true the caller must collect results via wait_thronglet. It lacks explicit 'do not use this when...' exclusions (e.g., resuming an existing session via send_message), so it stops just short of full guidance.

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