Ask Grok Build (new session) [experimental]
grok_askAsk Grok a question or task in a new session and receive the agent's final message, with options for live streaming, sandbox permissions, and workspace context.
Instructions
Ask Grok Build (grok -p) a question or task in a NEW session. EXPERIMENTAL.
⚠️ Community-verified only: this bridge has never completed an authenticated round-trip, because the author has no Grok subscription. Its flags are verified against grok 1.0.3, but the answer path is not. If it misbehaves, say so rather than working around it — and please report it.
Needs a SuperGrok / X Premium+ login (grok login) or an XAI_API_KEY env var;
run grok_status first to check. Returns the agent's final message, read from
grok's --output-format json result. Point workspace at a project dir for
context-aware answers.
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 |