get_model_status
Check the current initialization status of the TTS model in the Speech MCP Server to ensure readiness for text-to-speech operations using the Kokoro model.
Instructions
Get the current status of the TTS model initialization
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:319-331 (handler)The handler for the get_model_status tool. It calls ttsClient.getStatus() and formats a response message with the model status, elapsed time if initializing, and error if present.case "get_model_status": { const status = await ttsClient.getStatus(); let message = `Model status: ${status.status}`; if (status.elapsedMs) { message += ` (${Math.round(status.elapsedMs / 1000)}s elapsed)`; } if (status.error) { message += `\nError: ${status.error}`; } return { content: [{ type: "text", text: message }], }; }
- src/index.ts:98-106 (schema)Tool schema definition for get_model_status, specifying no input parameters.const getModelStatusTool: Tool = { name: "get_model_status", description: "Get the current status of the TTS model initialization", inputSchema: { type: "object", properties: {}, required: [], }, };
- src/index.ts:356-360 (registration)Registration of the get_model_status tool in the ListToolsRequest handler's response.textToSpeechTool, textToSpeechWithOptionsTool, listVoicesTool, getModelStatusTool, ],
- src/index.ts:182-209 (helper)Helper method in TTSClient class that returns the current initialization status of the TTS model, used by the tool handler.async getStatus(): Promise<{ status: 'uninitialized' | 'initializing' | 'ready' | 'error'; elapsedMs?: number; error?: string; retryCount?: number; }> { if (!this.initializationPromise) { return { status: 'uninitialized' }; } if (this.initializationError) { return { status: 'error', error: this.initializationError.message, retryCount: this.retryCount }; } if (!this.ttsInstance) { return { status: 'initializing', elapsedMs: Date.now() - (this.initializationStartTime || 0), retryCount: this.retryCount }; } return { status: 'ready', retryCount: this.retryCount }; }