Skip to main content
Glama
mordor-forge

gemini-media-mcp

by mordor-forge

Generate music

generate_music

Compose 30-second clips or full songs from a text prompt, setting genre, mood, instruments, tempo, structure, vocals, and lyrics.

Instructions

Compose music with Lyria: 30-second clips (clip, $0.04) or full songs of a few minutes with vocals and lyrics (full, $0.08). Control genre, mood, instruments, tempo and structure in the prompt; returns lyrics/structure text when available.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bpmNoOptional tempo hint in beats per minute.
modelNoclip (default: 30-second MP3, cheapest) or full (complete song up to about 3 minutes, vocals, WAV option). See list_models.
formatNomp3 (default) or wav (full model only).
imagesNoOptional images (up to 10) whose mood or scene should inspire the music.
lyricsNoOptional lyrics with section tags; they are sung in the language they are written in.
promptYesDescribe the music: genre, mood, instruments, tempo, key, production style and song structure. Use [Intro]/[Verse]/[Chorus]/[Bridge]/[Outro] tags or [0:00-0:15] timestamps to control sections.
outputNameNoOptional base file name.
instrumentalNoAsk for no vocals.
approvedCostUsdNoOnly needed above the confirmation threshold.
durationSecondsNoOptional target length hint for full songs (clip is always 30s).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
costYes
fileYes
modelYes
lyricsNoLyrics or song structure returned by the model
warningsNo
durationSecondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed18 schema fields changedv1.1.0
    • addedInput schema / properties / approvedCostUsd
      Added value: +{
      +  "description": "Only needed above the confirmation threshold.",
      +  "type": "number"
      +}
    • addedInput schema / properties / bpm
      Added value: +{
      +  "description": "Optional tempo hint in beats per minute.",
      +  "type": "integer"
      +}
    • addedInput schema / properties / durationSeconds
      Added value: +{
      +  "description": "Optional target length hint for full songs (clip is always 30s).",
      +  "type": "integer"
      +}
    • addedInput schema / properties / format
      Added value: +{
      +  "description": "mp3 (default) or wav (full model only).",
      +  "type": "string"
      +}
    • addedInput schema / properties / images
      Added value: +{
      +  "description": "Optional images (up to 10) whose mood or scene should inspire the music.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
    • addedInput schema / properties / instrumental
      Added value: +{
      +  "description": "Ask for no vocals.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / lyrics
      Added value: +{
      +  "description": "Optional lyrics with section tags; they are sung in the language they are written in.",
      +  "type": "string"
      +}
    • changedInput schema / properties / model / description
      Previous value: -"Model: clip (default, 30s clips) or full (up to 3 minutes, full songs with structure control)"New value: +"clip (default: 30-second MP3, cheapest) or full (complete song up to about 3 minutes, vocals, WAV option). See list_models."
    • addedInput schema / properties / outputName
      Added value: +{
      +  "description": "Optional base file name.",
      +  "type": "string"
      +}
    • changedInput schema / properties / prompt / description
      Previous value: -"Text description of the music to generate. Supports genre, instruments, BPM, key, mood, structure tags like [Verse] [Chorus] [Bridge], and custom lyrics"New value: +"Describe the music: genre, mood, instruments, tempo, key, production style and song structure. Use [Intro]/[Verse]/[Chorus]/[Bridge]/[Outro] tags or [0:00-0:15] timestamps to control sections."
    • addedOutput schema / properties / cost
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "basis": {
      +      "description": "How usd was derived: usage_metadata, unit_params, token_estimate or unpriced",
      +      "type": "string"
      +    },
      +    "breakdown": {
      +      "type": "string"
      +    },
      +    "estimatedUsd": {
      +      "description": "Estimate computed before the call from the price table",
      +      "type": "number"
      +    },
      +    "pending": {
      +      "description": "True while a video job is still running (cost is reserved, not final)",
      +      "type": "boolean"
      +    },
      +    "priceAsOf": {
      +      "type": "string"
      +    },
      +    "usd": {
      +      "description": "Best-known cost in USD; reconciled from token usage when the API reports it",
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "estimatedUsd",
      +    "usd",
      +    "basis"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / durationSeconds
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / file
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "bytes": {
      +      "type": "integer"
      +    },
      +    "durationSeconds": {
      +      "type": "number"
      +    },
      +    "height": {
      +      "type": "integer"
      +    },
      +    "mimeType": {
      +      "type": "string"
      +    },
      +    "name": {
      +      "type": "string"
      +    },
      +    "path": {
      +      "description": "Absolute path of the saved file on the server's filesystem",
      +      "type": "string"
      +    },
      +    "uri": {
      +      "description": "MCP resource URI; pass it back as an input to other tools or read it with resources/read",
      +      "type": "string"
      +    },
      +    "width": {
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "path",
      +    "uri",
      +    "name",
      +    "mimeType",
      +    "bytes"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / properties / filePath
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / properties / lyrics / description
      Added value: +"Lyrics or song structure returned by the model"
    • removedOutput schema / properties / mimeType
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / properties / warnings
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "filePath",
      -  "model",
      -  "mimeType"
      -]New value: +[
      +  "file",
      +  "model",
      +  "cost"
      +]
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations only declare openWorld/non-idempotent/non-destructive; the description adds the genuinely useful behavioral facts: this is a paid operation ($0.04 vs $0.08), the two models differ in duration and vocal capability, and it returns lyrics/structure text when available. It still does not explain the cost-confirmation threshold tied to approvedCostUsd.

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, front-loaded with the mode/cost tradeoff and followed by control-surface and return information. Every clause carries distinct information with no filler.

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

Completeness4/5

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

For a 10-parameter generation tool with an output schema present, the description covers the key decision axes (model, format, cost, prompt controls) without needing to restate return values. Only the approval-threshold mechanics for approvedCostUsd remain unexplained, a minor gap given the schema's own hint.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter is already documented (bpm, model, format, images, lyrics, prompt, etc.). The description mostly echoes the prompt's controllable aspects (genre, mood, instruments, tempo, structure) rather than adding syntax or constraints beyond the schema, so baseline 3 applies.

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 ('Compose music with Lyria') and immediately enumerates the two output modes with their lengths and prices. This clearly separates it from siblings like generate_speech and generate_video without needing to open any schema.

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?

Gives concrete selection context: clip is the cheap 30-second option, full yields minutes-long songs with vocals/lyrics, and format=wav applies only to full. It does not explicitly route the agent away from siblings (e.g., when to use generate_speech instead), so it stops short of full when/when-not guidance.

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