Skip to main content
Glama
allvoicelab

All Voice Lab MCP Server

Official
by allvoicelab

download_dubbing_audio

Retrieve and download processed audio files from completed dubbing projects using the dubbing ID from video dubbing or translation operations.

Instructions

[AllVoiceLab Tool] Download the audio file from a completed dubbing project.

This tool retrieves and downloads the processed audio file from a previously completed dubbing project.
It requires a valid dubbing ID that was returned from a successful video_dubbing or video_translation_dubbing operation.

Args:
    dubbing_id: The unique identifier of the dubbing project to download. Required.
    output_dir: Output directory for the downloaded audio file. Default is user's desktop.
    
Returns:
    TextContent containing file path to the downloaded audio file.
    
Limitations:
    - The dubbing project must exist and be in a completed state
    - The dubbing_id must be valid and properly formatted
    - Output directory must be accessible with write permissions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dubbing_idYes
output_dirNo

Implementation Reference

  • The main handler function that implements the logic for the 'download_dubbing_audio' tool. It validates inputs, uses the AllVoiceLab client to download the dubbing audio file, handles errors, and returns the file path.
    def download_dubbing_file(
        dubbing_id: str,
        output_dir: str = None
    ) -> TextContent:
        """
        Download audio file from a completed dubbing project
        
        Args:
            dubbing_id: The unique identifier of the dubbing project to download. Required.
            output_dir: Output directory for the downloaded audio file. Default is user's desktop.
            
        Returns:
            TextContent: Text content containing the path to the downloaded audio file.
        """
        all_voice_lab = get_client()
        output_dir = all_voice_lab.get_output_path(output_dir)
        logging.info(f"Tool called: download_dubbing_audio")
        logging.info(f"Dubbing ID: {dubbing_id}")
        logging.info(f"Output directory: {output_dir}")
    
        # Validate parameters
        if not dubbing_id:
            logging.warning("Dubbing ID parameter is empty")
            return TextContent(
                type="text",
                text="dubbing_id parameter cannot be empty"
            )
    
        # Validate and create output directory
        is_valid, error_message = validate_output_directory(output_dir)
        if not is_valid:
            return create_error_response(error_message)
    
        try:
            logging.info(f"Starting dubbing audio download, dubbing ID: {dubbing_id}")
            file_path = all_voice_lab.download_dubbing_audio(dubbing_id, output_dir)
            logging.info(f"Dubbing audio download successful, file saved at: {file_path}")
            return TextContent(
                type="text",
                text=f"Dubbing audio download completed, file saved at: {file_path}\n"
            )
        except Exception as e:
            logging.error(f"Dubbing audio download failed: {str(e)}")
            return TextContent(
                type="text",
                text=f"Download failed, tool temporarily unavailable"
            )
  • The registration of the 'download_dubbing_audio' tool using the FastMCP mcp.tool decorator, which associates the name, description (serving as schema), and binds it to the download_dubbing_file handler function.
    mcp.tool(
        name="download_dubbing_audio",
        description="""[AllVoiceLab Tool] Download the audio file from a completed dubbing project.
        
        This tool retrieves and downloads the processed audio file from a previously completed dubbing project.
        It requires a valid dubbing ID that was returned from a successful video_dubbing or video_translation_dubbing operation.
        
        Args:
            dubbing_id: The unique identifier of the dubbing project to download. Required.
            output_dir: Output directory for the downloaded audio file. Default is user's desktop.
            
        Returns:
            TextContent containing file path to the downloaded audio file.
            
        Limitations:
            - The dubbing project must exist and be in a completed state
            - The dubbing_id must be valid and properly formatted
            - Output directory must be accessible with write permissions
        """
    )(download_dubbing_file)
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 and does well by disclosing key behavioral traits: it's a read/download operation (implied by 'retrieves and downloads'), requires the project to be 'completed' (state dependency), has file system interaction (writes to output directory), and includes limitations about accessibility and permissions. It doesn't mention rate limits or authentication needs, but covers the essential operational constraints.

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 usage context, parameter details, return value, and limitations. Each section earns its place by adding distinct value without redundancy. The bullet-point limitations are particularly efficient.

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?

For a tool with 2 parameters, 0% schema coverage, no annotations, and no output schema, the description does an excellent job covering purpose, usage, parameters, returns, and limitations. The only minor gap is the lack of explicit output format details beyond 'file path', but given the tool's straightforward nature, this is nearly complete.

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%, so the description must compensate. It adds meaningful context for both parameters: 'dubbing_id' is explained as 'unique identifier of the dubbing project' from specific prior operations, and 'output_dir' gets a default value and purpose clarification. While it doesn't detail format constraints (e.g., path syntax), it provides sufficient semantic understanding beyond the bare schema.

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 ('download the audio file'), resource ('from a completed dubbing project'), and distinguishes it from siblings like 'get_dubbing_info' (which likely retrieves metadata rather than the file itself) and 'video_translation_dubbing' (which creates rather than downloads). The opening sentence provides a complete verb+resource statement.

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

Usage Guidelines4/5

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

The description explicitly states when to use this tool ('from a previously completed dubbing project') and provides prerequisites ('requires a valid dubbing ID that was returned from a successful video_dubbing or video_translation_dubbing operation'). However, it doesn't explicitly contrast when NOT to use it versus alternatives like 'get_dubbing_info' for status checking, though the context is clear enough.

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/allvoicelab/AllVoiceLab-MCP'

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