get_model_status
Check TTS model initialization status to verify readiness for speech synthesis operations.
Instructions
Get the current status of the TTS model initialization
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_model_status"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:319-331 (handler)The tool handler for 'get_model_status' which retrieves the model status via ttsClient.getStatus() and returns a formatted text response.
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:182-209 (helper)Core implementation logic in TTSClient.getStatus() that determines and returns the current status of the TTS model initialization, including states like 'initializing', 'ready', etc.
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 }; } - src/index.ts:98-106 (schema)Tool schema definition specifying name, description, and empty input schema (no parameters required).
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:355-360 (registration)Registration of getModelStatusTool in the list of available tools returned by ListToolsRequest handler.
tools: [ textToSpeechTool, textToSpeechWithOptionsTool, listVoicesTool, getModelStatusTool, ],