Skip to main content
Glama
misbahsy

Video & Audio Editing MCP Server

by misbahsy

convert_audio_format

Convert audio files to any specified format using defined input and output paths for compatibility across platforms and devices.

Instructions

Converts an audio file to the specified target format. Args: input_audio_path: Path to the source audio file. output_audio_path: Path to save the converted audio file. target_format: Desired output audio format (e.g., 'mp3', 'wav', 'aac'). Returns: A status message indicating success or failure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
input_audio_pathYes
output_audio_pathYes
target_formatYes

Implementation Reference

  • The core handler function for the convert_audio_format tool. It uses FFmpeg to convert the input audio file to the specified target format and handles various errors gracefully. The @mcp.tool() decorator registers this function as an MCP tool.
    def convert_audio_format(input_audio_path: str, output_audio_path: str, target_format: str) -> str:
        """Converts an audio file to the specified target format.
        Args:
            input_audio_path: Path to the source audio file.
            output_audio_path: Path to save the converted audio file.
            target_format: Desired output audio format (e.g., 'mp3', 'wav', 'aac').
        Returns:
            A status message indicating success or failure.
        """
        try:
            ffmpeg.input(input_audio_path).output(output_audio_path, format=target_format).run(capture_stdout=True, capture_stderr=True)
            return f"Audio format converted to {target_format} and saved to {output_audio_path}"
        except ffmpeg.Error as e:
            error_message = e.stderr.decode('utf8') if e.stderr else str(e)
            return f"Error converting audio format: {error_message}"
        except FileNotFoundError:
            return f"Error: Input audio file not found at {input_audio_path}"
        except Exception as e:
            return f"An unexpected error occurred: {str(e)}"
Behavior2/5

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

With no annotations provided, the description carries full burden but lacks behavioral details. It mentions 'success or failure' status but doesn't cover permissions, file overwriting, supported input formats, performance, or error handling, leaving significant gaps for a file conversion tool.

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 well-structured and front-loaded with the core purpose, followed by organized sections for Args and Returns. Every sentence adds value without redundancy, making it efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 3-parameter tool with no annotations and no output schema, the description covers basics but lacks depth on behavioral aspects like supported formats, file system interactions, or error details. It's minimally adequate but has clear gaps given the complexity of audio conversion.

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?

Schema description coverage is 0%, but the description compensates by clearly explaining all 3 parameters with examples (e.g., 'mp3', 'wav', 'aac' for target_format). It adds meaningful context beyond the bare schema, though it could specify path formats or format constraints more explicitly.

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 ('Converts an audio file') and resource ('to the specified target format'), distinguishing it from sibling tools like 'convert_audio_properties' or 'extract_audio_from_video' which handle different audio operations.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool versus alternatives like 'convert_audio_properties' or 'convert_video_format' is provided. The description only states what it does without context about appropriate scenarios or exclusions.

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

Related 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/misbahsy/video-audio-mcp'

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