get_configuration_status
Check if the Gemini API token is properly configured for the Nano-Banana-MCP server to ensure integration readiness.
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 detailed text response indicating if it's configured, the source, and setup 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 ListTools handler, including name, description, and input schema (empty object).{ name: "get_configuration_status", description: "Check if Gemini API token is configured", inputSchema: { type: "object", properties: {}, additionalProperties: false, }, },
- src/index.ts:165-166 (registration)Dispatch case in the CallTool request handler that routes 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, },