check_cli_status
Verify which code review CLIs are installed and available before requesting code reviews to ensure compatible tools are ready for analysis.
Instructions
Check which code review CLIs (Codex/OpenAI and Gemini) are installed and available. Use this before requesting reviews to see what's available.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:130-174 (handler)The core handler function that executes the check_cli_status tool. It ensures CLI detection is complete, constructs a markdown-formatted status report on the availability of OpenAI Codex CLI and Gemini CLI, including installation instructions if missing, and returns it as a tool response.private async handleCheckCLIStatus() { // Ensure detection has completed if (!this.cliAvailability.checked) { await this.detectCLIs(); } let status = "# CLI Status Check\n\n"; if (this.cliAvailability.codex) { status += "✓ **OpenAI CLI (Codex)**: Available\n"; } else { status += "✗ **OpenAI CLI (Codex)**: Not found\n"; status += " - Install: `npm install -g openai`\n"; status += " - Set API key: `export OPENAI_API_KEY='your-key'`\n"; } status += "\n"; if (this.cliAvailability.gemini) { status += "✓ **Gemini CLI**: Available\n"; } else { status += "✗ **Gemini CLI**: Not found\n"; status += " - See setup instructions in README.md\n"; status += " - Set API key: `export GOOGLE_API_KEY='your-key'`\n"; } status += "\n"; if (this.cliAvailability.codex && this.cliAvailability.gemini) { status += "**Status**: Both review CLIs are available. All features enabled.\n"; } else if (this.cliAvailability.codex || this.cliAvailability.gemini) { status += "**Status**: One review CLI is available. Partial functionality enabled.\n"; } else { status += "**Status**: No review CLIs available. Please install at least one to use reviews.\n"; } return { content: [ { type: "text", text: status, }, ], }; }
- src/index.ts:178-186 (registration)Tool registration in the getTools() method: defines the tool name, description, and input schema (empty object since no parameters are required). This array is likely returned in response to MCP list tools requests.{ name: "check_cli_status", description: "Check which code review CLIs (Codex/OpenAI and Gemini) are installed and available. Use this before requesting reviews to see what's available.", inputSchema: { type: "object", properties: {}, }, },
- src/index.ts:105-106 (registration)Dispatch registration in the CallToolRequestSchema handler: switch statement case that routes calls to 'check_cli_status' to the handleCheckCLIStatus method.case "check_cli_status": return await this.handleCheckCLIStatus();
- src/index.ts:182-185 (schema)Input schema definition for the tool: an empty object schema indicating no input parameters are required.inputSchema: { type: "object", properties: {}, },