suno_concat_music
Merge extended song segments into a single continuous audio file. Combine multiple music extensions into one complete composition.
Instructions
Concatenate extended song segments into a single complete audio file.
After extending a song multiple times with suno_extend_music, use this tool
to merge all the segments into one continuous audio file.
Use this when:
- You've extended a song one or more times
- You want a single audio file instead of multiple segments
- You're ready to finalize a long-form composition
Returns:
Task ID and the concatenated audio information with the full song.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| audio_id | Yes | ID of the LAST segment of an extended song chain. Suno will automatically find and merge all connected segments. | |
| callback_url | No | Webhook callback URL for asynchronous notifications. When provided, the API will call this URL when the concatenation is complete. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- tools/audio_tools.py:280-313 (handler)The main handler function that concatenates extended song segments into a single audio file. It takes an audio_id (the last segment of an extended song chain) and optional callback_url, then calls the Suno API with action='concat' to merge all connected segments.
@mcp.tool() async def suno_concat_music( audio_id: Annotated[ str, Field( description="ID of the LAST segment of an extended song chain. Suno will automatically find and merge all connected segments." ), ], callback_url: Annotated[ str | None, Field( description="Webhook callback URL for asynchronous notifications. When provided, the API will call this URL when the concatenation is complete." ), ] = None, ) -> str: """Concatenate extended song segments into a single complete audio file. After extending a song multiple times with suno_extend_music, use this tool to merge all the segments into one continuous audio file. Use this when: - You've extended a song one or more times - You want a single audio file instead of multiple segments - You're ready to finalize a long-form composition Returns: Task ID and the concatenated audio information with the full song. """ result = await client.generate_audio( action="concat", audio_id=audio_id, callback_url=callback_url, ) return format_audio_result(result) - tools/audio_tools.py:280-280 (registration)The @mcp.tool() decorator registers the suno_concat_music function as an MCP tool, making it available to the MCP server.
@mcp.tool() - core/types.py:6-14 (schema)Type definition for SunoModel, a Literal type defining valid Suno model versions. Used as a type annotation in the suno_concat_music tool signature (indirectly via imports in other tools).
SunoModel = Literal[ "chirp-v3-0", "chirp-v3-5", "chirp-v4", "chirp-v4-5", "chirp-v4-5-plus", "chirp-v5", "chirp-v5-5", ] - core/utils.py:43-56 (helper)Helper function that formats the audio generation result as a JSON string. It processes the API response dictionary and adds submission guidance for checking task status. Called by suno_concat_music to format its return value.
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, "suno_get_task", "suno_get_tasks_batch"), ensure_ascii=False, indent=2, ) - main.py:187-189 (registration)Documentation entry listing suno_concat_music in the available tools list with its description for display purposes.
"name": "suno_concat_music", "description": "Merge extended segments into complete audio", },