Skip to main content
Glama

grok_ask

Consult Grok for answers, or enable worker mode to let Grok edit files and run shell commands in your workspace. Returns structured JSON.

Instructions

Ask Grok (consult by default; worker=True to let Grok edit/run shell in cwd).

  • prompt: the instruction to Grok (required)

  • channel: persistent conversation channel (default "default")

  • cwd: working directory (default: the repo root; worker mode requires a worktree/scratch — enforced by bin/grok-ask's own dual-gate)

  • worker: True = worker mode (write + shell, auto-approved; main tree refused unless dual-gate override)

  • model: grok model id (default grok-4.5)

  • attach_file: file path to attach into the prompt (repeatable not supported here)

  • timeout_secs: wall-clock timeout in seconds (0 = default)

Returns JSON: {"status","class","text","run_id","handoff","cwd"} status is SUCCESS | FAILED(class) | TIMEOUT; text is the reply body.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNo
modelNo
promptYes
workerNo
channelNodefault
attach_fileNo
timeout_secsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description carries the full burden and does so thoroughly: it discloses that worker mode is 'auto-approved', can write and execute shell, requires a worktree/scratch, and refuses the main tree unless overridden. It also explains return statuses and timeout behavior, giving the agent a strong safety and behavior model.

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 front-loaded with a one-sentence summary, then uses a clean bulleted parameter list with defaults and behavioral notes. Every line provides necessary information about a complex tool, with no wasted words.

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?

Given the tool's high complexity (worker mode, shell access, dual-gate enforcement) and zero annotations, the description is complete: it covers modes, constraints, defaults, return JSON shape, and status values. The presence of an output schema is a bonus, and the description still explains enough to use the tool safely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description fully compensates by explaining every parameter: required prompt, channel default, cwd defaults and worktree requirement, worker mode semantics, model default, attach_file limitation ('repeatable not supported here'), and timeout meaning. This adds substantial meaning beyond the raw schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description begins with 'Ask Grok' and clearly distinguishes consult mode from worker mode, giving a specific verb and resource. However, it does not explicitly differentiate this tool from its sibling tools grok_workflow and grok_workflows, so it stops short of full sibling differentiation.

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 provides clear context for when to use worker mode ('worker=True to let Grok edit/run shell in cwd') and includes exclusions like 'main tree refused unless dual-gate override'. It does not mention when to use this tool versus the workflow siblings, so it lacks explicit alternative guidance.

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/Dragonshock/cli-agent-mcp'

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