Skip to main content
Glama

listAudioVoices

Access a comprehensive list of available audio voices for text-to-speech generation on the Pollinations Multimodal MCP Server, enabling precise voice selection for audio content creation.

Instructions

List available audio voices

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'listAudioVoices' tool. It fetches the list of available audio voices from the Pollinations API (models endpoint), extracts voices from the 'openai-audio' model, or falls back to a default list on error.
    async function listAudioVoices(params) { try { const url = buildUrl(AUDIO_API_BASE_URL, "models"); const response = await fetch(url); if (!response.ok) { throw new Error(`Failed to list models: ${response.statusText}`); } const models = await response.json(); // Find the openai-audio model and extract its voices const audioModel = models.find( (model) => model.name === "openai-audio", ); let voices; if (audioModel && Array.isArray(audioModel.voices)) { voices = audioModel.voices; } else { // Default voices if we can't find the list voices = ["alloy", "echo", "fable", "onyx", "nova", "shimmer"]; } // Return the response in MCP format using utility functions return createMCPResponse([createTextContent(voices, true)]); } catch (error) { console.error("Error listing audio voices:", error); // Return default voices if there's an error const defaultVoices = [ "alloy", "echo", "fable", "onyx", "nova", "shimmer", ]; // Return the response in MCP format using utility functions return createMCPResponse([createTextContent(defaultVoices, true)]); } }
  • The tool registration array entry within the exported 'audioTools' array, which is later imported and registered in src/index.js via server.tool().
    ["listAudioVoices", "List available audio voices", {}, listAudioVoices],

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tusharpatil2912/pollinations-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server