Skip to main content
Glama
brandon-fryslie

elevenlabs-mcp

create_composition_plan

Read-only

Generate a composition plan for music from a text prompt, defining style, sections, and duration. Optionally source an existing plan. The plan is used by the compose music tool to create the final audio.

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
positive_global_stylesYes
negative_global_stylesYes
sectionsYes

Implementation Reference

  • The handler function that executes the create_composition_plan tool logic. It takes a prompt, optional music_length_ms, and optional source_composition_plan, then calls client.music.composition_plan.create() and returns the 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
  • The @mcp.tool decorator that registers this function as a tool, with its description and argument schema (prompt: str, music_length_ms: int | None, source_composition_plan: MusicPrompt | None, returns MusicPrompt).
    )
    def create_composition_plan(
        prompt: str,
        music_length_ms: int | None = None,
        source_composition_plan: MusicPrompt | None = None,
    ) -> MusicPrompt:
  • The @mcp.tool decorator registers the function as an MCP tool named 'create_composition_plan' (the Python function name becomes the tool name).
    @mcp.tool(
  • Import of MusicPrompt type from elevenlabs.types, used as the type for the composition_plan parameter and return value.
    from elevenlabs.types import MusicPrompt
Behavior1/5

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

The annotation 'readOnlyHint: true' directly contradicts the description's claim of creating a new plan, which is a write operation. This is a major inconsistency, undermining transparency despite additional info on cost and rate limits.

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 concise with a clear first sentence and organized Args section. The credit/rate limit sentence adds relevant context, though it could be slightly tighter. Still, it is well-structured.

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?

The description covers purpose, parameters, and relationship to sibling tools, but the annotation contradiction undermines completeness. With an output schema present, return values are not required. However, the contradiction leaves the agent uncertain about behavioral expectations.

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?

Despite 0% schema coverage, the description adds meaningful details: prompt is explained, music_length_ms includes valid range and optionality, and source_composition_plan is described as an optional source. This compensates well for the lack of schema descriptions.

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 'Create a composition plan for music generation,' specifying the verb and resource. It also distinguishes from the sibling 'compose_music' tool by explaining that plans are used with that tool.

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 explains that no credits are used and rate limits apply, giving clear context for when to use. It also mentions the relationship to 'compose_music', but does not explicitly state when not to use or provide 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/brandon-fryslie/vibedungeon-voice'

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