Skip to main content
Glama
rnd-pro
by rnd-pro

delegate_task

Delegate a coding task to a headless CLI agent for parallel execution. Returns a task ID immediately; check progress with get_task_result.

Instructions

Delegate a coding task to a CLI agent running in headless mode. The agent is sandboxed to cwd directory only. Use include_dirs to grant access to additional directories. Use this for parallel work: code review, testing, refactoring, analysis, or any dev task.

Returns a task_id immediately (non-blocking). Use get_task_result to check status and retrieve the result.

IMPORTANT: CLI providers can take ~15-20s before the agent begins working. Set timeout to at least 60s for simple tasks, 300s+ for complex analysis. WORKSPACE: The agent can only use file tools within cwd and include_dirs. For other paths it can use shell commands (cat, find, ls).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory for the agent. Defaults to current working directory.
filesNoKnown relevant file paths used as structured focus hints for context resolution. May include paths attached in the UI.
modelNoModel to use in provider/model format (e.g. deepseek/deepseek-v4-pro). Leave empty for default.
skillNoActivate a global or active workspace skill by name before executing the task. Use list_skills to see available skills.
policyNoPolicy file for tool restrictions. Use built-in template name (e.g. "read-only", "safe-edit") or absolute path to .yaml policy file.
promptYesThe task description for the CLI agent. Be specific and detailed.
runnerNoRunner ID from agent-pool.config.json. Default: "local". Use SSH runners for remote execution.
chat_idNoChat ID to bind this task to in the UI. Optional.
timeoutNoTimeout in seconds. Default: 600 (10 minutes).
providerNoCLI provider to use. codex = Codex CLI, antigravity = Antigravity CLI, opencode = OpenCode CLI, claude = Claude Code CLI. Default: codex.
agent_slugNoAgent identity slug (e.g. "backend-engineer"). Auto-resolves prompt from team-memory agents/{slug}.md with composed skills. Takes priority over legacy "skill" parameter.
session_idNoResume an existing provider session/thread by ID. Supported by Antigravity, Codex, OpenCode, and Claude Code where available. Use list_sessions for Antigravity sessions.
focus_graphNoPortal-provided compact project-graph focus context for files[], including symbols, imports, dependencies, and web component summaries when present. Usually injected automatically; direct callers should prefer files[].
serviceTierNoService tier for Codex. Codex maps to service_tier.
context_modeNoContext package mode for delegated agents. auto injects the metadata-first resolved context package. off disables injection. Default: auto.
include_dirsNoAdditional directories to include in the agent workspace scope. By default the agent only has access to cwd. Use this to grant access to other project dirs, config dirs, etc.
on_wait_hintNoCustom coaching message shown when polling for results. Guides the calling agent on what to do while waiting.
allowed_toolsNoProvider tool allowlist passed to compatible runners. For Claude, entries map to --allowedTools, e.g. "Bash(node --check *)".
approval_modeNoApproval mode: yolo (auto-approve all), auto_edit (auto-approve edits only), plan (read-only). Default: yolo.
system_promptNoPre-resolved system prompt to prepend to the task. Overrides agent_slug resolution. Used by portal for portal-level agent injection.
parent_chat_idNoThe parent chat or task ID that initiated this delegation. Used for hierarchy. Optional.
resource_groupNoExisting resource group from local portal configuration. Overrides the agent frontmatter resource_group.
reasoningEffortNoProvider reasoning effort. Codex accepts the selected model value and maps it to model_reasoning_effort. Claude Code accepts low, medium, high, xhigh, or max and maps it to --effort.
Behavior4/5

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

With no annotations provided, the description carries full burden. It discloses key behaviors: non-blocking, sandboxed to cwd, ability to add directories via include_dirs, shell access outside workspace, startup delay, and recommended timeout values. Lacks details on error handling or rate limits but covers major aspects.

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 well-structured: first sentence states purpose, followed by sandbox constraints, use cases, async behavior, and important notes. It is relatively concise given the complexity, though some details could be more streamlined. No wasted sentences.

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?

Given the tool's complexity (23 parameters, no output schema), the description provides a good overview of the workflow, including async polling via get_task_result. It covers startup delay, workspace scope, and timeout advice. Could be more explicit about error scenarios but is generally complete.

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?

Schema description coverage is 100%, so baseline is 3. The description does not add significant parameter-specific explanations beyond what the schema already provides. It mentions workspace and timeout in a general sense but does not elaborate on individual parameters.

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 clearly states the tool's purpose: delegating a coding task to a CLI agent in headless mode. It specifies the verb 'delegate', the resource 'coding task', and the asynchronous nature (non-blocking, returns task_id). It distinguishes itself from siblings like delegate_task_readonly and get_task_result.

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 description provides explicit use cases: 'Use this for parallel work: code review, testing, refactoring, analysis, or any dev task.' It also advises on timeout settings and warns about startup delay. However, it does not explicitly contrast with delegate_task_readonly or other alternatives, leaving some ambiguity.

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/rnd-pro/agent-pool-mcp'

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