Skip to main content
Glama

Run Grok Build

grok

Execute a headless Grok Build agent to perform tasks like code reviews, web research, and file operations with configurable permission levels and session management.

Instructions

Run a headless Grok Build agent (grok -p). Returns the model text plus session, usage, and cost metadata. Permission is capped by GROK_MCP_PERMISSION_CEILING; requests above it are rejected rather than silently downgraded.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoAbsolute path. Working directory for the run. Passed as `--cwd`. Use the narrowest useful path.
denyNoRepeatable deny rules in `ToolPrefix(glob)` form, e.g. `Read(.env)`.
yoloNoShorthand for `permission: "full"`. Ignored when `permission` is set. `false` is not a request.
agentNoNamed subagent to run, passed as `--agent`.
allowNoRepeatable allow rules in `ToolPrefix(glob)` form, e.g. `Bash(npm*)`, `Write(src/**)`.
modelNoModel id to pass as `--model`. Omit to use the server default. Unknown ids are rejected by the CLI, not by this server.
rulesNoExtra system-prompt text, passed as `--rules`. Longer system-prompt text belongs in the prompt.
toolsNoInternal tool ids to allow, passed as a single comma-joined `--tools`. Shell is `run_terminal_command`, not `bash`.
writeNoShorthand for `permission: "write"`. Ignored when `permission` is set. `false` is not a request.
effortNoReasoning effort passed as `--effort`. Omit to use the server default. Values are passed through; the CLI rejects what the model does not advertise.
promptYesThe task for Grok to perform. Passed verbatim as `grok -p`.
resumeNoResume an existing session by id or title (`--resume`). Mutually exclusive with `continueSession`. Combine with `forkSession` to fork rather than continue in place.
maxTurnsNoMaximum agentic turns. Passed as `--max-turns`. Headless only.
sessionIdNoCreate a NEW session with this UUID (`--session-id`). Cannot be combined with `resume` or `continueSession`; use `forkSession` to name a fork.
backgroundNoRun detached and return a runId immediately instead of waiting. Poll with the `status` tool. The run survives a restart of this MCP server. `false` is not a request.
permissionNoPermission level for this run: `read-only`, `write`, or `full`. Must be at or below GROK_MCP_PERMISSION_CEILING. Omit to use the server default.
forkSessionNoUUID for a forked session. Requires `resume` or `continueSession`. Passed as `--fork-session --session-id`.
continueSessionNoContinue the most recent session for `cwd` (`--continue`). Mutually exclusive with `resume`. `false` is not a request.
disallowedToolsNoInternal tool ids to block, passed as `--disallowed-tools`.
disableWebSearchNoPass `--disable-web-search`. `false` is not a request.
Behavior4/5

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

The description discloses that the run is headless and returns metadata, which are behavioral traits not covered by annotations (no destructiveHint, no readOnlyHint specifics). It adds context about permission capping and rejection. The annotations already indicate a non-read-only, non-idempotent operation, and the description expands on that by detailing the permission model and return structure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise—only three sentences—and front-loaded with the core action. Every sentence adds meaningful information: what it does, what it returns, and how permissions work. No fluff or repetition of schema details.

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 that there is no output schema, the description does cover the key output ('model text plus session, usage, and cost metadata'). The tool is complex with 20 parameters, but the schema itself provides detailed descriptions for each. The description could be slightly more complete by mentioning that the tool runs in headless mode only (which is already clear), but overall it is adequate for an agent to invoke it correctly.

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%, meaning every parameter is described in the schema. The description adds value by explaining the overall return structure and permission behavior, but does not add unique semantic context for individual parameters beyond what the schema already provides. A score of 4 is justified because the schema already does the heavy lifting with detailed descriptions and examples (e.g., deny/allow rules in `ToolPrefix(glob)` form).

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 action ('Run a headless Grok Build agent'), the command used (`grok -p`), and the output ('model text plus session, usage, and cost metadata'). It also distinguishes from sibling tools by mentioning headless execution and returning metadata, which is distinct from tools like `status` or `stop` that deal with run management.

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 mentions permission ceiling ('GROK_MCP_PERMISSION_CEILING') and behavior for exceeded requests ('rejected rather than silently downgraded'), which helps agents understand constraints. However, it does not provide explicit guidance on when to use this tool versus siblings like `review` or `websearch`, or when not to use it.

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/Nuruvala/grok-build-to-claude'

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