speakers
Retrieve available speaker information from the VOICEVOX MCP Server for text-to-speech synthesis, enabling users to select and generate voice audio from text inputs.
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": "speakers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:41-46 (handler)Handler function for the 'speakers' tool: fetches speaker data using fetchSpeakers and returns it as a text content block with JSON stringified data.
async () => { const data = await fetchSpeakers(); return { content: [{ type: "text", text: JSON.stringify(data) }], } } - src/index.ts:39-47 (registration)Registration of the 'speakers' tool on the MCP server, with empty input schema ({}), using the handler function that returns speaker list as JSON text.
server.tool("speakers", {}, async () => { const data = await fetchSpeakers(); return { content: [{ type: "text", text: JSON.stringify(data) }], } } ) - src/api.ts:4-7 (helper)Helper function fetchSpeakers() that retrieves the list of speakers from the VOICEVOX API endpoint.
export async function fetchSpeakers() { const res = await fetch(`${VOICEVOX_API_URL}/speakers`); return await res.json(); }