Skip to main content
Glama

Delegate coding task to Grok

delegate
Destructive

Hand off coding work or ask Grok Build questions over ACP without shelling out, returning structured results and supporting session resume.

Instructions

Ask Grok Build a question or delegate coding work to it over ACP. Never shell out to grok — use this tool only. mode ask gives a second opinion; parallel calls with the same brief compare views. Auto-approves every permission the agent requests, in any mode and anywhere on disk. The agent's clarifying questions arrive in questions, or as prose in result — resume with resumeSessionId, the same mode and the answers in spec. Leave model (grok-4.7 where the account has it), fast, effort and context unset unless the user explicitly asks. If the delegate skill is installed, load it before handing off implementation.

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": {
      "spec": "<spec>",
      "workspace": "<workspace>"
    },
    "name": "delegate"
  }
}

Input Schema

NameRequiredDescriptionDefault
fastNoFast tier; higher cost — only when the user asks. Where the model or the account has none, the run goes on and protocolWarnings says so.
modeNoagent implements. ask answers: the CLI refuses its shell commands and file writes. plan returns a plan: the CLI refuses its write tool outside plan files, while shell commands still run and can change files. ask and plan run without subagents.agent
specYesTask brief: goal, scope, fixed decisions quoted exactly, acceptance criteria. Sent as written. Point at files to read rather than pasting code, or attach them with contextFiles.
modelNoBare ACP family id, version included, such as grok-4.7. The ids on offer depend on the account; doctor deep:true lists them.
effortNoExact reasoning-effort value for the selected model. Levels depend on the model and the account; one that is not on offer fails before the prompt. Pass only when the user asks for Grok effort — the host's own reasoning setting is unrelated.
contextNoContext window size as the model's label or a token count, such as 500k or 256000. Do not pass speculatively. Handled like fast when not on offer.
workspaceYesThe agent's working directory, not a limit. Smallest directory holding the task's files; with no such directory the project root is the floor. Must already exist; never create one for the call.
contextFilesNoPaths to attach instead of pasting contents into spec. Text becomes references the agent may open; images (png/jpg/gif/webp, <5MB) are sent inline. Relative paths resolve against workspace but are not limited to it. Skips are reported in protocolWarnings, never fatal.
resumeSessionIdNoContinue an existing ACP session. When delegate ran as an MCP task, its server-side task id works too.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv4.0.0
    • changedInput schema / properties / context / description
      Previous value: -"Context window size; gpt-5.x accepts 272k and 1m. Do not pass speculatively."New value: +"Context window size as the model's label or a token count, such as 500k or 256000. Do not pass speculatively. Handled like fast when not on offer."
    • changedInput schema / properties / effort / description
      Previous value: -"Exact Cursor thinking-effort value for the selected model. Values differ per model and some expose no effort option; invalid values fail before the prompt and name the accepted set. Pass only when the user asks for Cursor effort — the host's own reasoning setting is unrelated."New value: +"Exact reasoning-effort value for the selected model. Levels depend on the model and the account; one that is not on offer fails before the prompt. Pass only when the user asks for Grok effort — the host's own reasoning setting is unrelated."
    • changedInput schema / properties / fast / description
      Previous value: -"Fast tier; higher cost — only when the user asks."New value: +"Fast tier; higher cost — only when the user asks. Where the model or the account has none, the run goes on and protocolWarnings says so."
    • changedInput schema / properties / mode / description
      Previous value: -"agent implements; plan and ask are instructions to the agent, not limits."New value: +"agent implements. ask answers: the CLI refuses its shell commands and file writes. plan returns a plan: the CLI refuses its write tool outside plan files, while shell commands still run and can change files. ask and plan run without subagents."
    • removedInput schema / properties / model / default
      Removed value: -"composer-2.5"
    • changedInput schema / properties / model / description
      Previous value: -"Bare ACP family id, version included, such as composer-2.5. The ids on offer depend on the account; doctor deep:true lists them."New value: +"Bare ACP family id, version included, such as grok-4.7. The ids on offer depend on the account; doctor deep:true lists them."
  2. Changed1 schema field changedv3.4.0
    • addedInput schema / additionalProperties
      Added value: +false
  3. Changed3 schema fields changedv3.2.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / model / description
      Previous value: -"Bare ACP family id, version included: composer-2.5, grok-4.5, claude-opus-5, gpt-5.6-sol. doctor deep:true lists every id."New value: +"Bare ACP family id, version included, such as composer-2.5. The ids on offer depend on the account; doctor deep:true lists them."
    • changedInput schema / properties / resumeSessionId / description
      Previous value: -"Continue an existing ACP session."New value: +"Continue an existing ACP session. When delegate ran as an MCP task, its server-side task id works too."
  4. Changed1 schema field changedv2.5.0
    • removedInput schema / additionalProperties
      Removed value: -false
  5. Changed12 schema fields changedv2.0.0
    • changedInput schema / properties / context / description
      Previous value: -"Context window size. Not offered by every model; gpt-5.x accepts 272k and 1m."New value: +"Context window size; gpt-5.x accepts 272k and 1m. Do not pass speculatively."
    • changedInput schema / properties / contextFiles / description
      Previous value: -"Paths to attach instead of pasting file contents into spec. Text files are passed as references the agent may open; images (png, jpg, gif, webp, under 5MB) are sent inline. Relative paths resolve against workspace, and paths outside it are allowed — attach only files the agent should read. Anything skipped is reported in protocolWarnings, never fatal."New value: +"Paths to attach instead of pasting contents into spec. Text becomes references the agent may open; images (png/jpg/gif/webp, <5MB) are sent inline. Relative paths resolve against workspace but are not limited to it. Skips are reported in protocolWarnings, never fatal."
    • addedInput schema / properties / effort
      Added value: +{
      +  "description": "Exact Cursor thinking-effort value for the selected model. Values differ per model and some expose no effort option; invalid values fail before the prompt and name the accepted set. Pass only when the user asks for Cursor effort — the host's own reasoning setting is unrelated.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / properties / fast / description
      Previous value: -"Fast speed tier — higher cost; enable only when the user asks"New value: +"Fast tier; higher cost — only when the user asks."
    • changedInput schema / properties / mode / description
      Previous value: -"Requested agent mode. plan and ask are passed to the agent as instructions, not enforced by the bridge — the agent may write in any of them, so review the git diff after every run. ask held on every model tested while plan compliance varies by model, so prefer ask when you need the stricter read-only instruction."New value: +"agent implements; plan and ask are instructions to the agent, not limits."
    • addedInput schema / properties / model / description
      Added value: +"Bare ACP family id, version included: composer-2.5, grok-4.5, claude-opus-5, gpt-5.6-sol. doctor deep:true lists every id."
    • removedInput schema / properties / reasoning
      Removed value: -{
      -  "description": "Reasoning effort. Not offered by every model; gpt-5.x accepts none, low, medium, high, extra-high.",
      -  "minLength": 1,
      -  "type": "string"
      -}
    • changedInput schema / properties / resumeSessionId / description
      Previous value: -"Resume an existing ACP session instead of a new one"New value: +"Continue an existing ACP session."
    • changedInput schema / properties / spec / description
      Previous value: -"Inline task brief (default): goal, scope, decisions already made (constraints and fixed choices — quote the user's exact values verbatim), acceptance criteria. Point at files to read or mimic rather than pasting code. Optional file path if the user wants a persisted spec."New value: +"Task brief: goal, scope, fixed decisions quoted exactly, acceptance criteria. Sent as written. Point at files to read rather than pasting code, or attach them with contextFiles."
    • changedInput schema / properties / workspace / description
      Previous value: -"Working directory for the agent (defaults to cwd). Must be an existing directory; the call fails rather than creating it."New value: +"The agent's working directory, not a limit. Smallest directory holding the task's files; with no such directory the project root is the floor. Must already exist; never create one for the call."
    • addedInput schema / properties / workspace / minLength
      Added value: +1
    • changedInput schema / required
      Previous value: -[
      -  "spec"
      -]New value: +[
      +  "spec",
      +  "workspace"
      +]
  6. First observedv1.18.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and openWorldHint=true, and the description adds the crucial amplification: it 'auto-approves every permission the agent requests, in any mode and anywhere on disk' — far beyond the disk scope a caller might assume. It further discloses the interaction loop (clarifying questions arrive in questions or as prose in result, resume via resumeSessionId) and non-fatal failure signaling via protocolWarnings.

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?

Dense and front-loaded — purpose, prohibition, mode semantics, safety, then defaults and the resume path. Nearly every sentence earns its place, though the telegraphic fragments ('Never shell out to grok', 'parallel calls with the same brief compare views') trade readability for brevity.

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

Completeness5/5

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

For a 9-parameter, destructive, open-world tool with no output schema, the description covers the gaps that matter: authorization blast radius, how clarifying questions return, how to continue a session, which optional parameters to omit, and how warnings surface. Nothing an agent needs to invoke it safely is missing.

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; the description still adds meaning the schema does not, namely the resume protocol (same mode plus the answers in spec) and the standing instruction to leave model/fast/effort/context unset unless the user asks. Those are operational semantics rather than restated field docs, earning above baseline.

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 ('delegate coding work to it over ACP') and immediately disambiguates the modes (agent implements, ask answers, plan returns a plan). It also rules out the closest confusable action ('never shell out to grok'), so an agent knows exactly which channel to use.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Gives explicit when-to-use guidance ('mode ask gives a second opinion; parallel calls with the same brief compare views') plus a hard exclusion ('never shell out to grok — use this tool only'). It also prescribes defaults for the knobs ('leave model, fast, effort and context unset unless the user explicitly asks') and a prerequisite step (load the delegate skill before handoff).

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

Deploy Server

Other Tools