Skip to main content
Glama
misbahsy

Video & Audio Editing MCP Server

by misbahsy

convert_video_properties

Transform video files by converting format, resolution, codecs, bitrates, frame rate, and audio properties to meet specific requirements. Supports custom configurations for professional video editing tasks.

Instructions

Converts video file format and ALL specified properties like resolution, codecs, bitrates, and frame rate. Args listed in PRD. Returns: A status message indicating success or failure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
audio_bitrateNo
audio_channelsNo
audio_codecNo
audio_sample_rateNo
frame_rateNo
input_video_pathYes
output_video_pathYes
resolutionNo
target_formatYes
video_bitrateNo
video_codecNo

Implementation Reference

  • Handler function for the 'convert_video_properties' MCP tool. Applies various video and audio property changes using FFmpeg based on provided parameters.
    @mcp.tool()
    def convert_video_properties(input_video_path: str, output_video_path: str, target_format: str,
                                   resolution: str = None, video_codec: str = None, video_bitrate: str = None,
                                   frame_rate: int = None, audio_codec: str = None, audio_bitrate: str = None,
                                   audio_sample_rate: int = None, audio_channels: int = None) -> str:
        """Converts video file format and ALL specified properties like resolution, codecs, bitrates, and frame rate.
        Args listed in PRD.
        Returns:
            A status message indicating success or failure.
        """
        try:
            stream = ffmpeg.input(input_video_path)
            kwargs = {}
            vf_filters = []
    
            if resolution and resolution.lower() != 'preserve':
                if 'x' in resolution: 
                    vf_filters.append(f"scale={resolution}")
                else: 
                    vf_filters.append(f"scale=-2:{resolution}")
            
            if vf_filters:
                kwargs['vf'] = ",".join(vf_filters)
    
            if video_codec: kwargs['vcodec'] = video_codec
            if video_bitrate: kwargs['video_bitrate'] = video_bitrate
            if frame_rate: kwargs['r'] = frame_rate
            if audio_codec: kwargs['acodec'] = audio_codec
            if audio_bitrate: kwargs['audio_bitrate'] = audio_bitrate
            if audio_sample_rate: kwargs['ar'] = audio_sample_rate
            if audio_channels: kwargs['ac'] = audio_channels
            kwargs['format'] = target_format
    
            output_stream = stream.output(output_video_path, **kwargs)
            output_stream.run(capture_stdout=True, capture_stderr=True)
            return f"Video converted successfully to {output_video_path} with format {target_format} and specified properties."
        except ffmpeg.Error as e:
            error_message = e.stderr.decode('utf8') if e.stderr else str(e)
            return f"Error converting video properties: {error_message}"
        except FileNotFoundError:
            return f"Error: Input video file not found at {input_video_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?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool converts properties and returns a status message, but lacks critical details: whether this is a destructive operation (overwrites output file?), performance implications (CPU-intensive?), error conditions, or authentication needs. For a complex 11-parameter tool with no annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is brief (three sentences) but inefficiently structured. The first sentence is clear, but the second ('Args listed in PRD.') adds no value for the agent, and the third only partially describes output. It's front-loaded with the core purpose, but wastes space on unactionable references rather than providing concise, useful information.

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

Completeness2/5

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

Given the tool's complexity (11 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain the relationship between parameters (e.g., are all optional except the three required?), what happens if properties conflict, or the format of the status message return. For a video conversion tool with many configuration options, this leaves the agent with insufficient context to use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It lists example properties (resolution, codecs, bitrates, frame rate) which map to some of the 11 parameters, but doesn't explain semantics for all parameters (e.g., input_video_path format, target_format options, audio_channels meaning). The reference to 'Args listed in PRD' is unhelpful to the agent. With low coverage and incomplete parameter explanation, the description adds limited value.

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

Purpose4/5

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

The description clearly states the tool converts video file format and properties like resolution, codecs, bitrates, and frame rate. It specifies the verb 'converts' and resource 'video file format and properties', making the purpose evident. However, it doesn't explicitly differentiate from sibling tools like 'convert_video_format' or property-specific setters, which slightly reduces clarity.

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?

The description provides no guidance on when to use this tool versus alternatives. With many sibling tools for specific video/audio property adjustments (e.g., set_video_bitrate, set_video_codec) and format conversion (convert_video_format), the agent lacks context on whether this is a comprehensive conversion tool or when to choose it over more targeted options. No exclusions or prerequisites are mentioned.

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