Skip to main content
Glama
brandon-fryslie

elevenlabs-mcp

search_voice_library

Read-only

Search the ElevenLabs voice library to locate specific voices by name or category, with adjustable page and page size for browsing results.

Instructions

Search for a voice across the entire ElevenLabs voice library.

Args:
    page: Page number to return (0-indexed)
    page_size: Number of voices to return per page (1-100)
    search: Search term to filter voices by

Returns:
    TextContent containing information about the shared voices

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo
page_sizeNo
searchNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYes
textYes
annotationsNo
_metaNo

Implementation Reference

  • The main handler function that executes the 'search_voice_library' tool logic. It calls client.voices.get_shared() with page, page_size, and search parameters, formats the response into readable text with voice details (name, ID, category, gender, age, accent, description, use case, languages, preview URL), and returns TextContent.
    def search_voice_library(
        page: int = 0,
        page_size: int = 10,
        search: str | None = None,
    ) -> TextContent:
        response = client.voices.get_shared(
            page=page,
            page_size=page_size,
            search=search,
        )
    
        if not response.voices:
            return TextContent(
                type="text", text="No shared voices found with the specified criteria."
            )
    
        voice_list = []
        for voice in response.voices:
            language_info = "N/A"
            if hasattr(voice, "verified_languages") and voice.verified_languages:
                languages = []
                for lang in voice.verified_languages:
                    accent_info = (
                        f" ({lang.accent})"
                        if hasattr(lang, "accent") and lang.accent
                        else ""
                    )
                    languages.append(f"{lang.language}{accent_info}")
                language_info = ", ".join(languages)
    
            details = [
                f"Name: {voice.name}",
                f"ID: {voice.voice_id}",
                f"Category: {getattr(voice, 'category', 'N/A')}",
            ]
            # TODO: Make cleaner
            if hasattr(voice, "gender") and voice.gender:
                details.append(f"Gender: {voice.gender}")
            if hasattr(voice, "age") and voice.age:
                details.append(f"Age: {voice.age}")
            if hasattr(voice, "accent") and voice.accent:
                details.append(f"Accent: {voice.accent}")
            if hasattr(voice, "description") and voice.description:
                details.append(f"Description: {voice.description}")
            if hasattr(voice, "use_case") and voice.use_case:
                details.append(f"Use Case: {voice.use_case}")
    
            details.append(f"Languages: {language_info}")
    
            if hasattr(voice, "preview_url") and voice.preview_url:
                details.append(f"Preview URL: {voice.preview_url}")
    
            voice_info = "\n".join(details)
            voice_list.append(voice_info)
    
        formatted_info = "\n\n".join(voice_list)
        return TextContent(type="text", text=f"Shared Voices:\n\n{formatted_info}")
  • Registration of 'search_voice_library' as an MCP tool via @mcp.tool decorator with readOnlyHint=True and openWorldHint=True, along with the description docstring.
    @mcp.tool(
        annotations=ToolAnnotations(readOnlyHint=True, openWorldHint=True),
        description="""Search for a voice across the entire ElevenLabs voice library.
    
        Args:
            page: Page number to return (0-indexed)
            page_size: Number of voices to return per page (1-100)
            search: Search term to filter voices by
    
        Returns:
            TextContent containing information about the shared voices
        """
    )
Behavior3/5

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

Annotations already declare readOnlyHint and openWorldHint, indicating safe read-only operation and dynamic results. The description adds minimal behavioral context beyond that, such as 'entire voice library', which is consistent but not deeply informative.

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 very concise with a clear header line and a structured list of parameters and return type. Every sentence contributes value without redundancy.

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?

For a simple search tool with 3 parameters and an existing output schema, the description covers the purpose, parameter details, and return type. It is complete enough for a basic understanding, though it could clarify the difference from 'search_voices'.

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

Parameters4/5

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

With 0% schema description coverage, the description compensates by explaining each parameter's purpose: page is 0-indexed, page_size has a range (1-100), and search is a filter term. This adds meaningful context beyond the schema's type and default values.

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

Purpose4/5

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

The description clearly states it searches for a voice across the entire ElevenLabs voice library with a specific verb and resource. However, it does not explicitly differentiate from the sibling tool 'search_voices', which likely has a different scope, leaving some ambiguity.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like 'search_voices'. The description lacks context on ideal use cases or exclusions.

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/brandon-fryslie/vibedungeon-voice'

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