Skip to main content
Glama

create_composition_plan

Generate a structured composition plan for music creation based on text prompts, specifying musical elements and timing for subsequent audio generation.

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
music_length_msNo
promptYes
source_composition_planNo

Implementation Reference

  • The handler function for the 'create_composition_plan' tool, decorated with @mcp.tool() which registers it as an MCP tool. It calls the ElevenLabs client to create a music composition plan based on the provided prompt and returns the MusicPrompt object.
    @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
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 states that usage does not cost credits but is subject to rate limiting based on tier. It also implies this is a creation operation (not read-only) and hints at integration with another tool. It lacks details on error handling or response format.

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?

The description is appropriately sized and front-loaded with the core purpose and key behavioral details (credit cost, rate limiting, sibling tool relation). The parameter explanations are clear but slightly verbose; every sentence adds value, though it could be more streamlined.

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?

Given no annotations, no output schema, and 3 parameters with 0% schema coverage, the description does a decent job but has gaps. It covers purpose, usage, and parameters well, but lacks information on return values, error conditions, or more detailed rate limiting specifics, which are important for a creation tool.

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 semantics for all three parameters: 'prompt' is explained as the input for creating the plan, 'music_length_ms' includes range constraints and optional behavior, and 'source_composition_plan' clarifies it's optional and used as a source. This goes beyond the bare schema, though it could provide more on data types or examples.

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 ('Create a composition plan for music generation') and distinguishes it from the sibling 'compose_music' tool by explaining that composition plans are used when generating music with that tool. It provides a verb+resource combination that is unambiguous.

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 ('can be used when generating music with the compose_music tool'), providing clear context. However, it does not specify when NOT to use it or mention alternatives among siblings, which prevents a perfect score.

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

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