Ask Grok Build (new session) [experimental]
grok_askRuns 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
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Optional model override (`-m`, e.g. "grok-4.5"); validated against `grok models` and rejected on a typo. Omit to use grok's default. | |
| watch | No | If 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. | |
| prompt | Yes | Question or instruction for Grok. | |
| sandbox | No | Permission 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_s | No | Max seconds to wait for grok to complete. Default 180. | |
| workspace | No | Working root (`--cwd`). Defaults to the server cwd. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |