get_configuration_status
Verify if your OpenRouter API token is properly configured for image generation and editing operations.
Instructions
Check if OpenRouter API token is configured
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:532-572 (handler)The handler function that executes the tool logic. It checks if the OpenRouter API token is configured by verifying if config and openai instances are set, then returns a text response indicating the status and configuration source or instructions on how to configure.private async getConfigurationStatus(): Promise<CallToolResult> { const isConfigured = this.config !== null && this.openai !== null; let statusText: string; let sourceInfo = ""; if (isConfigured) { statusText = "✅ OpenRouter API token is configured and ready to use"; switch (this.configSource) { case 'environment': sourceInfo = "\n📍 Source: Environment variable (OPENROUTER_API_KEY)\n💡 This is the most secure configuration method."; break; case 'config_file': sourceInfo = "\n📍 Source: Local configuration file (.openrouter-image-config.json)\n💡 Consider using environment variables for better security."; break; } } else { statusText = "❌ OpenRouter API token is not configured"; sourceInfo = ` 📝 Configuration options (in priority order): 1. 🥇 MCP client environment variables (Recommended) 2. 🥈 System environment variable: OPENROUTER_API_KEY 3. 🥉 Use configure_openrouter_token tool 💡 For the most secure setup, add this to your MCP configuration: "env": { "OPENROUTER_API_KEY": "your-api-key-here" } 🔑 Get your API key from: https://openrouter.ai/settings/keys`; } return { content: [ { type: "text", text: statusText + sourceInfo, }, ], }; }
- src/index.ts:127-135 (registration)Tool registration in the listTools handler, including name, description, and input schema (empty object).{ name: "get_configuration_status", description: "Check if OpenRouter API token is configured", inputSchema: { type: "object", properties: {}, additionalProperties: false, }, },
- src/index.ts:187-188 (registration)Dispatch case in the CallToolRequest handler that routes the tool call to the getConfigurationStatus method.case "get_configuration_status": return await this.getConfigurationStatus();
- src/index.ts:130-134 (schema)Input schema definition for the tool: an empty object with no additional properties.inputSchema: { type: "object", properties: {}, additionalProperties: false, },