Skip to main content
Glama

Ask Grok Build (new session) [experimental]

grok_ask

Runs a Grok CLI sub-agent in a new session for agentic coding tasks; pass a workspace directory so it sees your repo, then follow up with grok_continue.

Instructions

Best for agentic coding on a SuperGrok / X Premium+ plan (grok -p), in a NEW session. EXPERIMENTAL: never completed an authenticated round-trip here (flags verified on grok 1.0.3), so if it misbehaves say so rather than working around it. Run grok_status first. Pass workspace=; without it the sub-agent sees no repo. Follow up with grok_continue. Its OS sandbox works on Linux/macOS only; on Windows read-only rests on a tool allowlist. Autonomous agent: trusted prompts only.

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": {
      "prompt": "<prompt>"
    },
    "name": "grok_ask"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoOptional model override (`-m`, e.g. "grok-4.5"); validated against `grok models` and rejected on a typo. Omit to use grok's default.
watchNoIf true, open a live "watch" view streaming grok's steps from its `--output-format streaming-json` event stream. Same final text is returned. Best-effort. Default false.
promptYesQuestion or instruction for Grok.
sandboxNoPermission policy (maps to grok's `--sandbox` profile plus a tool allowlist): "read-only" (default — the `read-only` profile, no write/shell tools, no subagents), "workspace-write" (the `workspace` profile: writes land in the workspace, ~/.grok and temp), or "danger-full-access" (profile `off` — avoid). ⚠️ grok's OS sandbox is LINUX/macOS ONLY (Landlock/Seatbelt); on Windows it is silently NOT enforced, so read-only there rests on the agent-enforced tool allowlist alone. For a hard boundary on every platform, use codex.read-only
timeout_sNoMax seconds to wait for grok to complete. Default 180.
workspaceNoWorking root (`--cwd`). Defaults to the server cwd.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.26.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false, openWorldHint=true, idempotentHint=false; the description goes well beyond by disclosing experimental status ('never completed an authenticated round-trip here'), the Windows sandbox gap where read-only 'silently NOT enforced', and autonomous-agent trust posture. It also tells the agent how to behave on failure ('if it misbehaves say so rather than working around it'), which annotations cannot express.

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 'Best for...' qualifier followed by hard constraints in descending priority, which is the right structure for a routing decision. It is dense with parentheticals and could shed a phrase or two (e.g., the flag-version aside), but no sentence is wasted.

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 non-idempotent, open-world mutation-ish tool, the description covers platform limits, session model, prerequisites, and follow-up path, and an output schema exists so return values need not be explained. Minor gaps remain: nothing about timeout/failure behavior or how `watch` changes the interaction, so the agent must read the schema for those.

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 beyond the schema for one parameter: `workspace` gains the consequence of omission ('the sub-agent sees no repo'), which is more informative than the schema's 'Defaults to the server cwd'. Model, watch, and timeout_s are left entirely to 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 names a specific capability (agentic coding with `grok -p` in a NEW session) and explicitly distinguishes it from the sibling it is not — `grok_continue` handles follow-ups. An agent can route between new-session and continuation semantics from the text alone, without opening either schema.

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?

It gives explicit preconditions (SuperGrok / X Premium+ plan, 'Run grok_status first'), usage rules ('Pass workspace=<project dir>; without it the sub-agent sees no repo'), the follow-up path (`grok_continue`), and a trust constraint ('trusted prompts only'). It even routes to an alternative boundary option (codex) when the platform sandbox is insufficient.

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