play_audio
Play audio files in WAV or MP3 format using the ElevenLabs MCP Server's audio processing capabilities.
Instructions
Play an audio file. Supports WAV and MP3 formats.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"input_file_path": "<input_file_path>"
},
"name": "play_audio"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input_file_path | Yes |
Implementation Reference
- elevenlabs_mcp/server.py:1099-1104 (handler)The handler function for the 'play_audio' tool. It processes the input file path using handle_input_file, plays the audio using elevenlabs.play, and returns a success message with the file path.
@mcp.tool(description="Play an audio file. Supports WAV and MP3 formats.") def play_audio(input_file_path: str) -> TextContent: file_path = handle_input_file(input_file_path) play(open(file_path, "rb").read(), use_ffmpeg=False) return TextContent(type="text", text=f"Successfully played audio file: {file_path}") - elevenlabs_mcp/server.py:1099-1099 (registration)The @mcp.tool decorator registers the play_audio function as an MCP tool with its description.
@mcp.tool(description="Play an audio file. Supports WAV and MP3 formats.")