list_voices
Retrieve available text-to-speech voices for use with macOS speech commands, enabling precise voice selection in applications.
Instructions
List available text-to-speech voices
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": "list_voices"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:114-131 (handler)Handler for the list_voices tool: executes 'say -v "?"' to list macOS TTS voices and returns the stdout as text content, with error handling.
case 'list_voices': { try { const { stdout } = await execAsync('say -v "?"'); return { content: [ { type: 'text', text: stdout, }, ], }; } catch (error: any) { throw new McpError( ErrorCode.InternalError, `Failed to list voices: ${error.message}` ); } } - src/index.ts:75-82 (registration)Registration of the list_voices tool in the ListToolsRequestSchema response, including name, description, and input schema (no required params).
{ name: 'list_voices', description: 'List available text-to-speech voices', inputSchema: { type: 'object', properties: {}, }, }, - src/index.ts:78-81 (schema)Input schema for list_voices tool: empty object schema (no parameters).
inputSchema: { type: 'object', properties: {}, },