Skip to main content
Glama

doctor

Checks availability and path resolution of supported AI CLI binaries to confirm they are accessible for execution.

Instructions

Check supported AI CLI binary availability and path resolution. Does not verify login state or terms acceptance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handleDoctor() method in ClaudeCodeServer class. It calls getCliDoctorStatus() and returns the result as JSON. This is the actual handler that executes when the 'doctor' tool is invoked.
    private async handleDoctor(): Promise<ServerResult> {
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(getCliDoctorStatus(), null, 2)
        }]
      };
  • src/app/mcp.ts:293-300 (registration)
    The tool registration in the ListTools handler. Defines the 'doctor' tool with its name, description, and empty input schema.
    {
      name: 'doctor',
      description: 'Check supported AI CLI binary availability and path resolution. Does not verify login state or terms acceptance.',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • src/app/mcp.ts:333-334 (registration)
    The CallToolRequest handler routing. Routes the 'doctor' tool name to the handleDoctor() method via a switch-case statement.
    case 'doctor':
      return this.handleDoctor();
  • The getCliDoctorStatus() function that gathers status for all supported CLIs (claude, codex, gemini, forge, opencode). Each CLI is checked via getCliBinaryStatus which inspects availability, path resolution, and configured commands.
    export function getCliDoctorStatus(): CliDoctorStatus {
      return {
        checks: {
          binaryAvailability: true,
          pathResolution: true,
          loginState: false,
          termsAcceptance: false,
        },
        claude: getCliBinaryStatus('claude'),
        codex: getCliBinaryStatus('codex'),
        gemini: getCliBinaryStatus('gemini'),
        forge: getCliBinaryStatus('forge'),
        opencode: getCliBinaryStatus('opencode'),
      };
    }
  • Type definitions for CliDoctorStatus and CliBinaryStatus interfaces, defining the shape of the data returned by the doctor tool.
    export interface CliDoctorStatus {
      checks: {
        binaryAvailability: boolean;
        pathResolution: boolean;
        loginState: boolean;
        termsAcceptance: boolean;
      };
      claude: CliBinaryStatus;
      codex: CliBinaryStatus;
      gemini: CliBinaryStatus;
      forge: CliBinaryStatus;
      opencode: CliBinaryStatus;
    }
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 discloses limitations upfront. It accurately characterizes the tool as a diagnostic check without side effects.

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?

Two brief sentences, front-loaded with the action. Every word is meaningful; no redundancy or filler.

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 simplicity (no parameters, no output schema), the description is fully adequate. It tells the agent exactly what to expect.

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?

The tool has no parameters, so schema coverage is 100%. The description adds value by explaining the purpose beyond the schema, clarifying what 'check' entails.

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 uses a specific verb ('Check') and resource ('supported AI CLI binary availability and path resolution'), clearly distinguishing it from sibling tools like 'run' or 'list_processes'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states what the tool does and, crucially, what it does not do ('Does not verify login state or terms acceptance'), providing clear guidance on when 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/lailai258/agent-bridge-mcp'

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