Skip to main content
Glama

run_thronglet

Delegate a coding task to an installed Claude Code, Codex, or OpenCode agent in a chosen directory; returns the final message as JSON, optionally in the background.

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.

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.3/5.0
Behavior4/5

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

With no annotations, the description carries the burden and largely does: it discloses the exact success payload shape, the structured-vs-text substitution under schema, and the different return shape under background: true. It omits failure/timeout behavior, cancellation interaction, and whether a returned session_id can be reused for send_message.

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 return contract, then the schema and background variants, with no filler sentences. It is dense to the point of being run-on, but each clause conveys distinct operational 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-object tool with no output schema, the description correctly takes on the burden of documenting the return envelope and the background variant. It leaves gaps around error handling and session reuse (send_message), which a caller of a long-running agent runner would plausibly need.

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 adds real meaning on top: it explains that `description` surfaces in session listings and that `schema` swaps `structured` for `text`, and it clarifies the background flag's semantics beyond the schema wording.

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+resource: runs an agent of an installed harness on a task in cwd, and returns its final message. It also distinguishes itself from siblings by pointing at list_harnesses for valid agent values and wait_thronglet for result collection, so an agent can place it in the family without opening schemas.

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 clear routing: use list_harnesses to resolve the agent string, use background: true plus wait_thronglet when you don't want to block. It does not address when to prefer this over send_message (new run vs. continuing an existing session), which is the most likely sibling confusion.

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