Skip to main content
Glama

Run Sub-Agent

run_sub_agent

Delegate a bounded task to a local model with automatic selection, concurrency handling, and cleanup, then log token usage for cost tracking.

Instructions

Delegate one bounded task to a local model. Resolves the model from the profile's registry by roles (or an explicit model_id), acquires a model respecting the profile's concurrency tier (reuse already-loaded, evict on sequential tiers, refuse at parallel capacity), runs the brief once, cleans the reply, unloads exactly once if it loaded the model, and logs exactly one token-usage entry for cost tracking.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskNo
briefYes
rolesNo
effortNo
imagesNo
profileYes
model_idNo
providerNo
output_schemaNo
reasoning_budgetNo
output_schema_nameNo
system_prompt_overrideNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/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 model resolution, concurrency-tier behavior (reuse, evict, refuse), single execution, reply cleaning, exact-once unload, and exactly one token-usage log entry. This is unusually transparent.

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?

The description is a single dense sentence, but it is front-loaded with the core purpose and every clause adds behavioral detail. It is somewhat long, but not bloated.

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

Completeness2/5

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

Despite rich behavioral detail, the tool has 12 parameters, no annotations, and no output schema. The description omits semantics for most parameters and does not describe return values or error conditions, leaving significant gaps for an agent trying to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains profile, roles, model_id, and brief, but 12 parameters exist and many (effort, images, provider, output_schema, reasoning_budget, system_prompt_override, task) receive no semantic guidance.

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: 'Delegate one bounded task to a local model.' It clearly distinguishes this tool from siblings like start_sub_agent_job or chat by emphasizing a one-shot, bounded, local-model delegation.

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?

The phrase 'one bounded task' provides clear context for when to use this tool. It does not explicitly name alternatives or exclusions, but the bounded-task framing and detailed execution flow make the intended use apparent.

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