Skip to main content
Glama

Diagnose Grok delegation setup

doctor
Read-onlyIdempotent

Diagnose the Grok CLI, login, plan, and workspace to identify delegation failures; warnings show what needs action before retrying delegated coding tasks.

Instructions

Diagnose the grok CLI, login, plan and workspace (default: server cwd); warnings lists what needs action. Run when delegation fails.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "doctor"
  }
}

Input Schema

NameRequiredDescriptionDefault
deepNoAlso open an ACP session: adds the models this account offers, the default model check, modes and the current model's options.
workspaceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv3.4.0
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / deep / description
      Previous value: -"Run an ACP handshake (start → initialize → newSession) to verify the agent is usable; adds models, modes and the current model's options."New value: +"Also open an ACP session: adds the models this account offers, the default model check, modes and the current model's options."
    • addedInput schema / properties / workspace
      Added value: +{
      +  "type": "string"
      +}
  2. Changed1 schema field changedv3.2.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. Changed1 schema field changedv2.5.0
    • removedInput schema / additionalProperties
      Removed value: -false
  4. Changed1 schema field changedv2.0.0
    • changedInput schema / properties / deep / description
      Previous value: -"When true, run a lightweight ACP handshake (start → initialize → newSession) to verify the agent is usable"New value: +"Run an ACP handshake (start → initialize → newSession) to verify the agent is usable; adds models, modes and the current model's options."
  5. First observedv1.18.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and a closed-world scope, so safety is covered. The description adds real context beyond them: the workspace defaults to the server cwd, and the result contains a "warnings" list flagging what needs action, which tells the agent how to interpret output.

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?

Two compact clauses, verb first, with the trigger condition placed last where it is easy to scan. Nothing is wasted, though the semicolon-joined clause about "warnings" is slightly dense and could read more cleanly as its own sentence.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is low-complexity (two optional params, no output schema) and the annotations carry the safety profile, so the description covers the essentials: scope, default workspace, trigger, and one output field. It still leaves the overall shape of the diagnostic report and the cost of "deep" (it opens an ACP session) unstated in the description, which are meaningful gaps for an agent deciding whether to call it.

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

Parameters3/5

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

Schema coverage is 50%: "deep" is fully explained in the schema (ACP session, model list, default-model check, modes), while "workspace" has no schema description. The description partially compensates by stating the workspace default (server cwd), but it never says whether workspace is a path, a name, or an identifier, so the meaning gap is only half closed.

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?

Uses a specific verb ("Diagnose") plus an explicit list of what is checked: the grok CLI, login, plan, and workspace. That is far more informative than the title alone and is clearly a read-only diagnostic, distinct in intent from the delegate/cancel siblings, though it never names them.

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?

"Run when delegation fails" gives a concrete trigger condition for reaching for this tool rather than delegate or cancel. It stops short of exclusions (e.g., don't use for a pre-flight check before delegating), so it is clear but not exhaustive.

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

Deploy Server

Other Tools