create_voice_from_preview
Save a generated voice preview to your ElevenLabs voice library for future use, allowing you to store custom voices created through text-to-speech conversion.
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_description | Yes | ||
| voice_name | Yes |
Implementation Reference
- elevenlabs_mcp/server.py:922-942 (handler)The handler function for the 'create_voice_from_preview' MCP tool. It is decorated with @mcp.tool, which also serves as the registration. The function calls the ElevenLabs client API to create a voice from a preview and returns a success message.@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. """ ) 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}", )