get_configuration_status
Verify if the Gemini API token is properly configured for the Nano-Banana-MCP server to enable API functionality.
Instructions
Check if Gemini API token is configured
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:444-482 (handler)The handler function that checks the Gemini API configuration status and returns a text response indicating if it's configured, the source, and configuration instructions if not.private async getConfigurationStatus(): Promise<CallToolResult> { const isConfigured = this.config !== null && this.genAI !== null; let statusText: string; let sourceInfo = ""; if (isConfigured) { statusText = "✅ Gemini API token is configured and ready to use"; switch (this.configSource) { case 'environment': sourceInfo = "\n📍 Source: Environment variable (GEMINI_API_KEY)\n💡 This is the most secure configuration method."; break; case 'config_file': sourceInfo = "\n📍 Source: Local configuration file (.nano-banana-config.json)\n💡 Consider using environment variables for better security."; break; } } else { statusText = "❌ Gemini API token is not configured"; sourceInfo = ` 📝 Configuration options (in priority order): 1. 🥇 MCP client environment variables (Recommended) 2. 🥈 System environment variable: GEMINI_API_KEY 3. 🥉 Use configure_gemini_token tool 💡 For the most secure setup, add this to your MCP configuration: "env": { "GEMINI_API_KEY": "your-api-key-here" }`; } return { content: [ { type: "text", text: statusText + sourceInfo, }, ], }; }
- src/index.ts:110-118 (registration)Tool registration in the ListToolsRequestSchema handler, defining the tool's name, description, and empty input schema.{ name: "get_configuration_status", description: "Check if Gemini API token is configured", inputSchema: { type: "object", properties: {}, additionalProperties: false, }, },
- src/index.ts:165-166 (registration)Dispatcher case in CallToolRequestSchema handler that routes the tool call to the getConfigurationStatus method.case "get_configuration_status": return await this.getConfigurationStatus();
- src/index.ts:113-117 (schema)Input schema definition for the tool: an empty object (no parameters required).inputSchema: { type: "object", properties: {}, additionalProperties: false, },