Skip to main content
Glama

producer_swap_vocals

Replace vocals in a base audio track with vocals from another track to create vocal mashups and remixes.

Instructions

Swap the vocals of one song with vocals from another song.

Takes the instrumental track from the base audio and combines it with
the vocal track from the swap audio.

Use this when:
- You want to combine vocals from one song with instrumentals from another
- You want to hear how different vocals sound over the same beat
- You're creating a vocal mashup

Returns:
    Task ID and the swapped audio information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
audio_idYesID of the base audio whose vocals will be replaced.
swap_audio_idYesID of the audio whose vocals to use as replacement.
callback_urlNoWebhook callback URL for asynchronous notifications.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The `producer_swap_vocals` async function is the handler for swapping vocals between two songs. It is decorated with @mcp.tool(), takes audio_id (base audio), swap_audio_id (vocals source), and optional callback_url parameters. It calls client.generate_audio with action='swap_vocals' and returns the formatted JSON result via format_audio_result.
    @mcp.tool()
    async def producer_swap_vocals(
        audio_id: Annotated[
            str,
            Field(description="ID of the base audio whose vocals will be replaced."),
        ],
        swap_audio_id: Annotated[
            str,
            Field(description="ID of the audio whose vocals to use as replacement."),
        ],
        callback_url: Annotated[
            str | None,
            Field(description="Webhook callback URL for asynchronous notifications."),
        ] = None,
    ) -> str:
        """Swap the vocals of one song with vocals from another song.
    
        Takes the instrumental track from the base audio and combines it with
        the vocal track from the swap audio.
    
        Use this when:
        - You want to combine vocals from one song with instrumentals from another
        - You want to hear how different vocals sound over the same beat
        - You're creating a vocal mashup
    
        Returns:
            Task ID and the swapped audio information.
        """
        result = await client.generate_audio(
            action="swap_vocals",
            audio_id=audio_id,
            swap_audio_id=swap_audio_id,
            callback_url=callback_url,
        )
        return format_audio_result(result)
  • Input parameters for producer_swap_vocals: audio_id (str, the base audio whose vocals will be replaced), swap_audio_id (str, the audio whose vocals to use as replacement), and callback_url (optional str, webhook URL).
        audio_id: Annotated[
            str,
            Field(description="ID of the base audio whose vocals will be replaced."),
        ],
        swap_audio_id: Annotated[
            str,
            Field(description="ID of the audio whose vocals to use as replacement."),
        ],
        callback_url: Annotated[
            str | None,
            Field(description="Webhook callback URL for asynchronous notifications."),
        ] = None,
    ) -> str:
  • The tool is registered via the @mcp.tool() decorator on the producer_swap_vocals function. 'mcp' is a FastMCP instance defined in core/server.py.
    @mcp.tool()
    async def producer_swap_vocals(
  • main.py:198-201 (registration)
    The tool name 'producer_swap_vocals' is listed in the server capabilities/tools list in main.py with description 'Swap vocals between two songs'.
    {
        "name": "producer_swap_vocals",
        "description": "Swap vocals between two songs",
    },
  • The format_audio_result function is a helper that formats the API response as JSON with async submission guidance (polling instructions for producer_get_task).
    def format_audio_result(data: dict[str, Any]) -> str:
        """Format audio generation result as JSON.
    
        Args:
            data: API response dictionary
    
        Returns:
            JSON string representation of the result
        """
        return json.dumps(
            _with_submission_guidance(data, "producer_get_task", "producer_get_tasks_batch"),
            ensure_ascii=False,
            indent=2,
        )
Behavior3/5

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

No annotations are provided, so the description must disclose behavior. It describes the combination process and the return type (Task ID and swapped audio), but does not discuss destructiveness, permissions, or async details beyond the callback_url parameter.

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

Conciseness4/5

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

Well-structured with headings, bullet points, and a returns section. Concise without wasting words, though one could argue the bullet points could be more succinct.

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?

Reasonably complete for a tool with a output schema, but lacks prerequisites (e.g., audio IDs must be valid), error conditions, or time estimates. The description adequately explains the main functionality and return value.

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

Parameters3/5

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

Schema description coverage is 100%, so baseline is 3. The description reinforces parameter roles (base vs swap audio) but adds no additional meaning beyond what the schema already provides.

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 it swaps vocals between two songs, specifying the instrumental track from base audio and vocal track from swap audio. This is distinct from siblings like producer_swap_instrumentals.

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?

Provides explicit 'Use this when' bullet points listing three scenarios, giving clear context. However, it does not mention when not to use or offer alternatives.

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/AceDataCloud/ProducerMCP'

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