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, },