Skip to main content
Glama
elevenlabs

ElevenLabs MCP Server

Official
by elevenlabs

create_composition_plan

Generate structured music composition plans from text prompts to guide AI music generation, specifying length and style parameters for customized audio creation.

Instructions

Create a composition plan for music generation. Usage of this endpoint does not cost any credits but is subject to rate limiting depending on your tier. Composition plans can be used when generating music with the compose_music tool.

Args: prompt: Prompt to create a composition plan for music_length_ms: The length of the composition plan to generate in milliseconds. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. source_composition_plan: An optional composition plan to use as a source for the new composition plan

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYes
music_length_msNo
source_composition_planNo

Implementation Reference

  • The @mcp.tool decorated handler function that implements the 'create_composition_plan' tool. It creates a music composition plan using the ElevenLabs client API based on the provided prompt, optional length, and source plan.
    @mcp.tool( description="""Create a composition plan for music generation. Usage of this endpoint does not cost any credits but is subject to rate limiting depending on your tier. Composition plans can be used when generating music with the compose_music tool. Args: prompt: Prompt to create a composition plan for music_length_ms: The length of the composition plan to generate in milliseconds. Must be between 10000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt. source_composition_plan: An optional composition plan to use as a source for the new composition plan """ ) def create_composition_plan( prompt: str, music_length_ms: int | None = None, source_composition_plan: MusicPrompt | None = None, ) -> MusicPrompt: composition_plan = client.music.composition_plan.create( prompt=prompt, music_length_ms=music_length_ms, source_composition_plan=source_composition_plan, ) return composition_plan

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/elevenlabs/elevenlabs-mcp'

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