create_voice_from_preview
Save a generated voice preview to your ElevenLabs voice library by providing a voice ID, name, and description for future use.
Instructions
Add a generated voice to the voice library. Uses the voice ID from the text_to_voice tool.
⚠️ COST WARNING: This tool makes an API call to ElevenLabs which may incur costs. Only use when explicitly requested by the user.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| generated_voice_id | Yes | ||
| voice_name | Yes | ||
| voice_description | Yes |
Implementation Reference
- elevenlabs_mcp/server.py:987-1001 (handler)The main handler function that executes the tool logic: calls the ElevenLabs client to create a voice from a preview and returns a success message.def create_voice_from_preview( generated_voice_id: str, voice_name: str, voice_description: str, ) -> TextContent: voice = client.text_to_voice.create_voice_from_preview( voice_name=voice_name, voice_description=voice_description, generated_voice_id=generated_voice_id, ) return TextContent( type="text", text=f"Success. Voice created: {voice.name} with ID:{voice.voice_id}", )
- elevenlabs_mcp/server.py:981-986 (registration)Registers the create_voice_from_preview tool with the MCP server using the @mcp.tool decorator.@mcp.tool( description="""Add a generated voice to the voice library. Uses the voice ID from the `text_to_voice` tool. ⚠️ COST WARNING: This tool makes an API call to ElevenLabs which may incur costs. Only use when explicitly requested by the user. """ )