Skip to main content
Glama

isolate_audio

Extract and save isolated audio from any file using ElevenLabs API. Specify input file path and optional output directory to separate audio content.

Instructions

Isolate audio from a file and save the output audio file to a given directory. Directory is optional, if not provided, the output file will be saved to $HOME/Desktop.

⚠️ 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
NameRequiredDescriptionDefault
input_file_pathYes
output_directoryNo

Implementation Reference

  • The @mcp.tool decorator registers the 'isolate_audio' tool, including its description which implies the input schema (input_file_path: str, output_directory: str | None = None).
        description="""Isolate audio from a file and save the output audio file to a given directory.
        Directory is optional, if not provided, the output file will be saved to $HOME/Desktop.
    
        ⚠️ COST WARNING: This tool makes an API call to ElevenLabs which may incur costs. Only use when explicitly requested by the user.
        """
    )
  • The core implementation of the 'isolate_audio' tool. It processes the input audio file, calls the ElevenLabs client.audio_isolation.convert API to isolate the audio, saves the result to an output file, and returns a success message with the file path.
    def isolate_audio(
        input_file_path: str, output_directory: str | None = None
    ) -> TextContent:
        file_path = handle_input_file(input_file_path)
        output_path = make_output_path(output_directory, base_path)
        output_file_name = make_output_file("iso", file_path.name, output_path, "mp3")
        with file_path.open("rb") as f:
            audio_bytes = f.read()
        audio_data = client.audio_isolation.convert(
            audio=audio_bytes,
        )
        audio_bytes = b"".join(audio_data)
    
        with open(output_path / output_file_name, "wb") as f:
            f.write(audio_bytes)
    
        return TextContent(
            type="text",
            text=f"Success. File saved as: {output_path / output_file_name}",
        )
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It successfully reveals critical behavioral traits: the tool makes external API calls to ElevenLabs, incurs potential costs, has a default output location ($HOME/Desktop), and performs audio isolation. However, it doesn't specify error handling, rate limits, or authentication requirements.

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 perfectly front-loaded with the core functionality in the first sentence, followed by important behavioral details. Every sentence earns its place: the first explains the purpose, the second clarifies optional parameter behavior, and the third provides critical usage guidance. No wasted words.

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?

Given the tool's complexity (external API calls, file operations) and lack of both annotations and output schema, the description does well by covering purpose, parameters, cost implications, and default behavior. However, it doesn't describe the output format, success/failure responses, or error conditions that would be helpful for a tool with no output schema.

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 must compensate for the lack of parameter documentation. It explains that 'input_file_path' is for the source file and 'output_directory' is optional with a default location, adding meaningful context beyond the bare schema. However, it doesn't specify file format requirements or path validation rules.

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

Purpose5/5

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

The description clearly states the specific action ('isolate audio from a file') and resource ('save the output audio file to a given directory'), distinguishing it from siblings like 'speech_to_text' or 'play_audio' which handle different audio processing tasks. It precisely defines what the tool does without being vague or tautological.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool ('Only use when explicitly requested by the user') and includes a cost warning that helps differentiate it from free alternatives. It clearly defines the trigger condition and potential exclusions based on cost considerations.

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/projectservan8n/elevenlabs-mcp'

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