Skip to main content
Glama

Delegate Task

delegate_task

Delegate a task to a specialized local coding agent by spawning its CLI in a given workspace, waiting for it to finish, and returning the output and exit code.

Instructions

Spawns the named agent's CLI in workspace_path with the given prompt, waits for it to finish, and returns its stdout/stderr/exit code. Use get_agent_roster first to pick the right agent_name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesThe task/instructions to hand to the agent's CLI.
agent_nameYesWhich agent to delegate to. One of: codex, agy, claude-code. See get_agent_roster for specializations.
timeout_msNoMax time to wait for the agent process, in ms. Defaults to 15 minutes, capped at 1 hour.
workspace_pathYesAbsolute path to the working directory the agent CLI should run in.
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the spawn-wait-return mechanism and the return payload (stdout/stderr/exit code), adding real behavioral detail beyond the tool name. However, it does not warn about potential side effects of running an arbitrary agent CLI in the workspace, which is an important unmentioned behavior.

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?

Two sentences, front-loaded with the definitive action and outcome, with the follow-up usage hint. No wasted words or redundancy.

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 tool with no output schema and moderate complexity, the description sufficiently covers purpose, return values, and prerequisite usage. It omits timeout failure behavior, but the timeout parameter's schema description partially addresses it. Overall, the context is adequate.

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

Parameters3/5

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

The input schema covers 100% of parameters with descriptions, so the baseline is 3. The description paraphrases how workspace_path and prompt are used but does not add semantic details beyond the schema.

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 states a specific verb ('spawns') and resource ('agent's CLI'), and clearly distinguishes the tool from the sibling by describing execution rather than roster lookup. It explains the full lifecycle: spawn, wait, and return output/exit code.

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?

It explicitly directs the user to call get_agent_roster first to choose the correct agent_name, which provides clear usage context. It does not explicitly state when not to use this tool, but the sequencing guidance is unambiguous.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rputasi/mcp-swarm-router'

If you have feedback or need assistance with the MCP directory API, please join our Discord server