Skip to main content
Glama
pinkpixel-dev

MCPollinations Multimodal MCP Server

listAudioVoices

Discover available text-to-speech voices to select the right audio option for your content generation needs.

Instructions

List all available audio voices for text-to-speech generation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function implementing listAudioVoices tool logic, returning a hardcoded list of available TTS voices.
    /**
     * List available audio voices
     *
     * @returns {Promise<Object>} - Object containing the list of available voice options
     */
    export async function listAudioVoices() {
      // Return the complete list of available voices
      const voices = [
        "alloy",
        "echo",
        "fable",
        "onyx",
        "nova",
        "shimmer",
        "coral",
        "verse",
        "ballad",
        "ash",
        "sage",
        "amuch",
        "dan"
      ];
    
      return { voices };
    }
  • JSON schema defining the listAudioVoices tool, including name, description, and empty input schema (no parameters required).
    /**
     * Schema for the listAudioVoices tool
     */
    export const listAudioVoicesSchema = {
      name: 'listAudioVoices',
      description: 'List all available audio voices for text-to-speech generation',
      inputSchema: {
        type: 'object',
        properties: {}
      }
    };
  • MCP server dispatch handler that executes listAudioVoices tool upon matching tool name and formats the response.
    } else if (name === 'listAudioVoices') {
      try {
        const result = await listAudioVoices();
        return {
          content: [
            { type: 'text', text: JSON.stringify(result, null, 2) }
          ]
        };
      } catch (error) {
        return {
          content: [
            { type: 'text', text: `Error listing audio voices: ${error.message}` }
          ],
          isError: true
        };
      }
  • src/schemas.js:28-44 (registration)
    Central function registering all tool schemas (including listAudioVoicesSchema) for the MCP ListTools endpoint.
    /**
     * Get all tool schemas as an array
     * @returns {Array} Array of all tool schemas
     */
    export function getAllToolSchemas() {
      return [
        generateImageUrlSchema,
        generateImageSchema,
        editImageSchema,
        generateImageFromReferenceSchema,
        listImageModelsSchema,
        respondAudioSchema,
        listAudioVoicesSchema,
        respondTextSchema,
        listTextModelsSchema
      ];
    }

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/pinkpixel-dev/MCPollinations'

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