Skip to content

Commit c3465cf

Browse files
committed
fmt
1 parent f0d7ce0 commit c3465cf

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

elevenlabs_mcp/server.py

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,7 @@ def make_outbound_call(
642642

643643
return TextContent(type="text", text=f"Outbound call initiated: {response}.")
644644

645+
645646
@mcp.tool(
646647
description="""Search for a voice across the entire ElevenLabs voice library.
647648
@@ -664,20 +665,26 @@ def search_voice_library(
664665
page_size=page_size,
665666
search=search,
666667
)
667-
668+
668669
if not response.voices:
669-
return TextContent(type="text", text="No shared voices found with the specified criteria.")
670-
670+
return TextContent(
671+
type="text", text="No shared voices found with the specified criteria."
672+
)
673+
671674
voice_list = []
672675
for voice in response.voices:
673676
language_info = "N/A"
674677
if hasattr(voice, "verified_languages") and voice.verified_languages:
675678
languages = []
676679
for lang in voice.verified_languages:
677-
accent_info = f" ({lang.accent})" if hasattr(lang, "accent") and lang.accent else ""
680+
accent_info = (
681+
f" ({lang.accent})"
682+
if hasattr(lang, "accent") and lang.accent
683+
else ""
684+
)
678685
languages.append(f"{lang.language}{accent_info}")
679686
language_info = ", ".join(languages)
680-
687+
681688
details = [
682689
f"Name: {voice.name}",
683690
f"ID: {voice.voice_id}",
@@ -694,21 +701,19 @@ def search_voice_library(
694701
details.append(f"Description: {voice.description}")
695702
if hasattr(voice, "use_case") and voice.use_case:
696703
details.append(f"Use Case: {voice.use_case}")
697-
704+
698705
details.append(f"Languages: {language_info}")
699-
706+
700707
if hasattr(voice, "preview_url") and voice.preview_url:
701708
details.append(f"Preview URL: {voice.preview_url}")
702-
709+
703710
voice_info = "\n".join(details)
704711
voice_list.append(voice_info)
705-
712+
706713
formatted_info = "\n\n".join(voice_list)
707714
return TextContent(type="text", text=f"Shared Voices:\n\n{formatted_info}")
708715

709716

710-
711-
712717
@mcp.tool(description="List all phone numbers associated with the ElevenLabs account")
713718
def list_phone_numbers() -> TextContent:
714719
"""List all phone numbers associated with the ElevenLabs account.

0 commit comments

Comments
 (0)