Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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();
  • Input schema definition for the tool: an empty object with no additional properties.
    inputSchema: { type: "object", properties: {}, additionalProperties: false, },

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/WeiYu021/openrouter-image-MCP'

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