Skip to main content
Glama

Generate music

generate_music

Generates music from a description, with optional custom lyrics or instrumental-only output. Costs 1 credit per requested second; returns a project id for wait_for_audio_project.

Input Schema

NameRequiredDescriptionDefault
nameNoGive your audio a custom name for easy identification.AI Music Generator
styleYes
durationYesRequested track duration in seconds, from 15 to 300. Determines credits charged.

Output Schema

NameRequiredDescriptionDefault
idYesUnique ID of the audio. Use it with the [Get audio Project API](https://docs.magichour.ai/api-reference/audio-projects/get-audio-details) to fetch status and downloads.
credits_chargedYesThe amount of credits deducted from your account to generate the audio. We charge credits right when the request is made. If an error occurred while generating the audio, credits will be refunded and this field will be updated to include the refund.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare the mutation/safety profile (readOnlyHint=false, destructiveHint=false), and the description adds genuinely new context: a credit cost of 1 per requested second and that the call is asynchronous, returning a project id. It does not say whether a failed generation still burns credits or how long generation typically takes, which keeps it from a 5.

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

Conciseness5/5

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

Two compact sentences that front-load the purpose, then cost and the next-step tool. Every clause carries information an agent would otherwise have to guess.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return shape need not be spelled out; the description covers capability, cost, output mode, and the natural next call. For a 3-parameter nested tool with annotations, nothing essential to correct invocation is missing.

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 coverage is 67% and the description adds real meaning beyond the fields: it clarifies the credit-per-second relationship to duration and reinforces the lyrics/instrumental interaction. It leaves the nested `style` object's structure and duration bounds to the schema, so it complements rather than substitutes.

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?

States a specific verb and resource ('Generates music') plus the input modality ('from a description') and the two output modes (custom lyrics vs instrumental-only). This clearly separates it from the many image/video siblings and aligns with the audio-project siblings like wait_for_audio_project and get_audio_project.

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 routes the agent to the follow-up tool ('returns a project id for wait_for_audio_project'), which is genuine when-to-use-next guidance. It stops short of naming when to prefer a sibling (e.g., create_video_from_audio for reuse of existing audio), so it falls shy of full alternatives coverage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources