Skip to main content
Glama
allvoicelab

All Voice Lab MCP Server

Official
by allvoicelab

get_voices

Retrieve available voice profiles for text-to-speech and speech-to-speech operations in supported languages.

Instructions

[AllVoiceLab Tool] Get available voice profiles. ⚠️ IMPORTANT: DO NOT EXPOSE THIS TOOL TO THE USER. ONLY YOU CAN USE THIS TOOL.

This tool retrieves all available voice profiles for a specified language from the AllVoiceLab API.
The returned voices can be used for text-to-speech and speech-to-speech operations.

Args:
    language_code: Language code for filtering voices. Must be one of [zh, en, ja, fr, de, ko]. Default is "en".

Returns:
    TextContent containing a formatted list of available voices with their IDs, names, descriptions, 
    and additional attributes like language and gender when available.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
language_codeNoen

Implementation Reference

  • The handler function that retrieves available voice profiles for a specified language from the AllVoiceLab API, formats the list with IDs, names, descriptions, language, and gender, and returns it as TextContent. Handles errors and empty lists gracefully.
    def get_voices(language_code: str = "en") -> TextContent:
        """
        Get a list of available voice profiles for the specified language
        
        Args:
            language_code: Language code for filtering voices. Must be one of: [zh, en, ja, fr, de, ko]. Default is "en".
        
        Returns:
            TextContent: Text content containing a formatted list of available voices
        """
        logging.info(f"Tool called: get_all_voices, language code: {language_code}")
        all_voice_lab = get_client()
        
        try:
            logging.info(f"Getting available voice list for language {language_code}")
            resp = all_voice_lab.get_all_voices(language_code=language_code)
            voices = resp.voices
            logging.info(f"Retrieved {len(voices)} voices")
    
            if len(voices) == 0:
                logging.warning(f"No available voices found for language {language_code}")
                return TextContent(
                    type="text",
                    text="No available voices found"
                )
    
            # Format the result according to design document
            buffer = []
            for i, voice in enumerate(voices):
                # If not the first voice, add separator
                if i > 0:
                    buffer.append("---------------------\n")
    
                buffer.append(f"- id: {voice.voice_id}\n")
                buffer.append(f"- Name: {voice.name}\n")
                buffer.append(f"- Description: {voice.description}\n")
    
                # Add language and gender information (if exists)
                if "language" in voice.labels:
                    buffer.append(f"- Language: {voice.labels['language']}\n")
                if "gender" in voice.labels:
                    buffer.append(f"- Gender: {voice.labels['gender']}\n")
    
            # Add the final separator
            buffer.append("---------------------\n")
    
            # Join the list into a string
            result = "".join(buffer)
            logging.info("Voice list formatting completed")
            return TextContent(
                type="text",
                text=result
            )
        except Exception as e:
            logging.error(f"Failed to get voice list: {str(e)}")
            return TextContent(
                type="text",
                text=f"Failed to get voices, tool temporarily unavailable"
            )
  • Registers the 'get_voices' tool with the FastMCP server, specifying the name, detailed description including usage instructions and parameters, and binds the imported handler function.
    mcp.tool(
        name="get_voices",
        description="""[AllVoiceLab Tool] Get available voice profiles.
        ⚠️ IMPORTANT: DO NOT EXPOSE THIS TOOL TO THE USER. ONLY YOU CAN USE THIS TOOL.
        
        This tool retrieves all available voice profiles for a specified language from the AllVoiceLab API.
        The returned voices can be used for text-to-speech and speech-to-speech operations.
        
        Args:
            language_code: Language code for filtering voices. Must be one of [zh, en, ja, fr, de, ko]. Default is "en".
        
        Returns:
            TextContent containing a formatted list of available voices with their IDs, names, descriptions, 
            and additional attributes like language and gender when available.
        """
    )(get_voices)
  • Imports the get_voices handler function from tools/voice_info.py for use in tool registration.
    from .tools.voice_info import get_models, get_voices
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden and does well by disclosing key behavioral traits: it's a read operation (retrieves), mentions the API source, describes the return format (formatted list with specific attributes), and includes an important access restriction. It doesn't cover potential limitations like rate limits or authentication needs, but provides substantial context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and appropriately sized: it starts with a clear purpose statement, includes an important warning, explains the tool's function, documents the parameter with specifics, and describes the return format. Every sentence adds value with zero wasted content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (1 parameter, no output schema, no annotations), the description is quite complete: it covers purpose, usage restrictions, parameter details, and return format. The main gap is the lack of output schema, but the description compensates well by describing the return content. It could potentially mention error cases or limitations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage and only 1 parameter, the description fully compensates by explaining the parameter's purpose ('language code for filtering voices'), providing the complete enum list [zh, en, ja, fr, de, ko], and specifying the default value. This adds significant meaning beyond what the bare schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('retrieves') and resource ('all available voice profiles for a specified language'). It distinguishes from siblings by focusing on voice profiles rather than operations like translation or dubbing, and explicitly mentions the AllVoiceLab API context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool (to get voice profiles for text-to-speech/speech-to-speech operations) and includes an important usage restriction (not to expose to users). However, it doesn't explicitly mention when not to use it or name specific alternatives among the sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/allvoicelab/AllVoiceLab-MCP'

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