Skip to main content
Glama

Plan, check and analyze a song

song
Read-onlyIdempotent

Plans and analyzes a song written in MTL text (render checks too); returns a share link that plays it in the browser (90 days, no render). Stages: plan, write, light analysis loop, one deep analysis, fix; then the share link to listen; one render only when the user asks for an audio file. song(plan) gives a skeleton; analyze:true: light (repeatable); deep:true: measured (once). Your own sound: i3 - name="Glass Lead" wave=saw cutoff=55 (a quoted word after iN is a preset); tracks play it as i3. The syntax: describe(topic="syntax") gives the core grammar and a list of sections, each read with q (q="synth" every synth field, q="arp", q="modulation" ...). Stopping a note: = releases it (its release plays out); an ECx effect cuts it dead after x ticks (_!EC0 on that step, D4!EC3 on the note). Each reply has a songId: send ref instead of the text again, with layers for batch edits (tracks, instruments, mix, order). It warns when a song is longer than one audio file holds (WAV about 8 min, Ogg or Opus longer). To work on a song in another program, convert it to MIDI or a tracker module. Schema a964948f.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "song"
  }
}

Input Schema

NameRequiredDescriptionDefault
lenNoTarget seconds
mtlNoSong in MTL text (describe topic=mtl). Kept 2 hours as a working copy: later calls can send ref (the songId) instead.
refNoInstead of mtl: a songId from an earlier reply (kept 2 hours), a render asset id, or a share link
altsNoOther MTL versions to rank by score
deepNoWith analyze: deep analysis, a measured analysis-only render. Suited to once or twice when the song is nearly done
loopNoShould loop
planNoAlone: {bpm, meter, key, peak, sections:[{id, bars, energy 1-5, role}], mix?} gives a skeleton, timing, checks
checkNoSame as analyze
genreNoScores against this genre's factors (each genre scores its own); describe(topic="genres")
rangeNoWith analyze: one section, e.g. "2" or "2-3" (order entries)
styleNoVoice palette; default chip
energyNoPlanned 1-5 per order entry, for check:true
intentNoDeliberate choices, not scored
layersNoWith mtl or ref: batch edits {add:["A: 3 i3 v40: C4 . . ."], replace, remove:["A:3"], instruments, mix, notes, order}; returns the edited song
returnNomtl echoes the song back
voicesNoList these instruments' settings
analyzeNoLight analysis: no audio, instant, free. Suited to every edit
compareNoWith analyze: A/B against an earlier songId, asset id or share link
composeNoInstead of mtl: {bpm, form, chords, parts:[{id,gen}]}. describe(topic="generators")
skip_planNoReason to skip research and plan for a full song (else they come first)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / description
      Previous value: -"Schema 826121bd"New value: +"Schema a964948f"
  2. Changed1 schema field changed
    • changedInput schema / description
      Previous value: -"Schema 2d544474"New value: +"Schema 826121bd"
  3. Changed1 schema field changed
    • changedInput schema / description
      Previous value: -"Schema 0781812e"New value: +"Schema 2d544474"
  4. Changed1 schema field changed
    • changedInput schema / description
      Previous value: -"Schema 0d11f08d"New value: +"Schema 0781812e"
  5. Changed1 schema field changed
    • changedInput schema / description
      Previous value: -"Schema 2d7abb8b"New value: +"Schema 0d11f08d"
  6. Changed1 schema field changed
    • changedInput schema / description
      Previous value: -"Schema ff675289"New value: +"Schema 2d7abb8b"
  7. Changed3 schema fields changed
    • changedInput schema / description
      Previous value: -"Schema 2a55f659"New value: +"Schema ff675289"
    • changedInput schema / properties / layers / description
      Previous value: -"With mtl: batch edits {add:[\"A: 3 i3 v40: C4 . . .\"], replace, remove:[\"A:3\"], instruments, mix, notes}; returns the edited song"New value: +"With mtl or ref: batch edits {add:[\"A: 3 i3 v40: C4 . . .\"], replace, remove:[\"A:3\"], instruments, mix, notes, order}; returns the edited song"
    • addedInput schema / properties / layers / properties / order
      Added value: +{
      +  "description": "The song's order line, e.g. \"A B C D C D\" (| marks the loop start)",
      +  "type": "string"
      +}
  8. Changed2 schema fields changed
    • changedInput schema / description
      Previous value: -"Schema 71227a86"New value: +"Schema 2a55f659"
    • addedInput schema / properties / skip_plan
      Added value: +{
      +  "description": "Reason to skip research and plan for a full song (else they come first)",
      +  "type": "string"
      +}
  9. Changed4 schema fields changed
    • changedInput schema / description
      Previous value: -"Schema 64bfe66c"New value: +"Schema 71227a86"
    • changedInput schema / properties / intent / properties / keep / description
      Previous value: -"Flags kept on purpose, each with a short reason: {\"POLY.CUT\": \"mono chip arp\"} or \"POLY.CUT:3\" for one track"New value: +"Kept on purpose, with a reason: flag codes {\"POLY.CUT\": \"mono arp\"} (\"POLY.CUT:3\" one track) or score codes (REPEAT, LEN...), not deducted"
    • addedInput schema / properties / intent / properties / melody
      Added value: +{
      +  "description": "Melody track, if not the highest",
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • changedInput schema / properties / layers / properties / notes / description
      Previous value: -"Polyphony: [{ch, ins, section?, notes:[[pitch, startBeat, beats, vel]]}]; placed on sub-channels"New value: +"Polyphony: [{ch, ins, section?, notes:[[pitch, startBeat, beats, vel]]}]; placed on sub-channels; vel 0-64 as vNN"
  10. Changed4 schema fields changed
    • changedInput schema / description
      Previous value: -"Schema eb59845f"New value: +"Schema 64bfe66c"
    • changedInput schema / properties / genre / description
      Previous value: -"Genre or alias, see describe(topic=\"genres\")"New value: +"Scores against this genre's factors (each genre scores its own); describe(topic=\"genres\")"
    • addedInput schema / properties / genre / enum
      Added value: +[
      +  "chiptune",
      +  "chip-battle",
      +  "game-overworld",
      +  "game-battle",
      +  "game-town",
      +  "game-dungeon",
      +  "game-menu",
      +  "game-victory",
      +  "game-racing",
      +  "game-horror",
      +  "jrpg",
      +  "classical",
      +  "baroque",
      +  "fugue",
      +  "minuet",
      +  "romantic",
      +  "march",
      +  "waltz",
      +  "nocturne",
      +  "lullaby",
      +  "hymn",
      +  "carol",
      +  "jazz",
      +  "bebop",
      +  "cool-jazz",
      +  "swing",
      +  "big-band",
      +  "dixieland",
      +  "ragtime",
      +  "bossa-nova",
      +  "smooth-jazz",
      +  "fusion",
      +  "jazz-ballad",
      +  "gypsy-jazz",
      +  "blues",
      +  "slow-blues",
      +  "jump-blues",
      +  "shuffle",
      +  "soul",
      +  "gospel",
      +  "rnb",
      +  "funk",
      +  "disco",
      +  "rock",
      +  "hard-rock",
      +  "blues-rock",
      +  "punk",
      +  "pop-punk",
      +  "metal",
      +  "prog-rock",
      +  "ska",
      +  "pop",
      +  "synth-pop",
      +  "power-pop",
      +  "dance-pop",
      +  "power-ballad",
      +  "kpop",
      +  "musical-theater",
      +  "country",
      +  "bluegrass",
      +  "folk",
      +  "celtic",
      +  "sea-shanty",
      +  "polka",
      +  "reggae",
      +  "salsa",
      +  "samba",
      +  "tango",
      +  "latin-pop",
      +  "house",
      +  "techno",
      +  "trance",
      +  "edm",
      +  "synthwave",
      +  "vaporwave",
      +  "dubstep",
      +  "drum-and-bass",
      +  "breakbeat",
      +  "trap",
      +  "hip-hop",
      +  "boom-bap",
      +  "lofi",
      +  "chillout",
      +  "ambient",
      +  "drone",
      +  "new-age",
      +  "industrial",
      +  "cinematic",
      +  "epic",
      +  "suspense",
      +  "horror",
      +  "fantasy",
      +  "western",
      +  "spy",
      +  "sci-fi",
      +  "world",
      +  "afrobeat",
      +  "klezmer",
      +  "bollywood"
      +]
    • addedInput schema / properties / intent / properties / keep
      Added value: +{
      +  "additionalProperties": {
      +    "type": "string"
      +  },
      +  "description": "Flags kept on purpose, each with a short reason: {\"POLY.CUT\": \"mono chip arp\"} or \"POLY.CUT:3\" for one track",
      +  "type": "object"
      +}
  11. Changed10 schema fields changed
    • changedInput schema / description
      Previous value: -"Schema 3b8fe45c"New value: +"Schema eb59845f"
    • addedInput schema / properties / analyze
      Added value: +{
      +  "description": "Light analysis: no audio, instant, free. Suited to every edit",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / check / description
      Previous value: -"Score only: no summary, no render, free"New value: +"Same as analyze"
    • addedInput schema / properties / compare
      Added value: +{
      +  "description": "With analyze: A/B against an earlier songId, asset id or share link",
      +  "type": "string"
      +}
    • addedInput schema / properties / deep
      Added value: +{
      +  "description": "With analyze: deep analysis, a measured analysis-only render. Suited to once or twice when the song is nearly done",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / layers / description
      Previous value: -"With mtl: batch edits {add:[\"A: 3 i3 v40: C4 . . .\"], replace, remove:[\"A:3\"], instruments, mix}; returns the edited song"New value: +"With mtl: batch edits {add:[\"A: 3 i3 v40: C4 . . .\"], replace, remove:[\"A:3\"], instruments, mix, notes}; returns the edited song"
    • addedInput schema / properties / layers / properties / notes
      Added value: +{
      +  "description": "Polyphony: [{ch, ins, section?, notes:[[pitch, startBeat, beats, vel]]}]; placed on sub-channels",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "ch": {
      +        "type": "integer"
      +      },
      +      "ins": {
      +        "type": [
      +          "integer",
      +          "string"
      +        ]
      +      },
      +      "notes": {
      +        "items": {},
      +        "type": "array"
      +      },
      +      "section": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "ch",
      +      "ins",
      +      "notes"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / properties / mtl / description
      Previous value: -"Song in MTL text (describe topic=mtl). Send it whole each time; we keep none."New value: +"Song in MTL text (describe topic=mtl). Kept 2 hours as a working copy: later calls can send ref (the songId) instead."
    • addedInput schema / properties / range
      Added value: +{
      +  "description": "With analyze: one section, e.g. \"2\" or \"2-3\" (order entries)",
      +  "type": "string"
      +}
    • addedInput schema / properties / ref
      Added value: +{
      +  "description": "Instead of mtl: a songId from an earlier reply (kept 2 hours), a render asset id, or a share link",
      +  "type": "string"
      +}
  12. Changed1 schema field changed
    • changedInput schema / description
      Previous value: -"Schema 9b20e675"New value: +"Schema 3b8fe45c"
  13. Changed4 schema fields changed
    • changedInput schema / description
      Previous value: -"Schema 415a8741"New value: +"Schema 9b20e675"
    • addedInput schema / properties / energy
      Added value: +{
      +  "description": "Planned 1-5 per order entry, for check:true",
      +  "items": {
      +    "type": "number"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / layers
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "With mtl: batch edits {add:[\"A: 3 i3 v40: C4 . . .\"], replace, remove:[\"A:3\"], instruments, mix}; returns the edited song",
      +  "properties": {
      +    "add": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "instruments": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "mix": {
      +      "additionalProperties": false,
      +      "description": "dB; \"-inf\" silences, 0 resets. Faders balance (first choice), gain sets one sound, level is overall loudness",
      +      "properties": {
      +        "faders": {
      +          "additionalProperties": {
      +            "anyOf": [
      +              {
      +                "maximum": 6,
      +                "minimum": -60,
      +                "type": "number"
      +              },
      +              {
      +                "enum": [
      +                  "-inf",
      +                  "off"
      +                ],
      +                "type": "string"
      +              }
      +            ],
      +            "default": 0
      +          },
      +          "description": "{\"2\": -6}",
      +          "propertyNames": {
      +            "pattern": "^([1-9]|1[0-6])$"
      +          },
      +          "type": "object"
      +        },
      +        "gain": {
      +          "additionalProperties": {
      +            "anyOf": [
      +              {
      +                "maximum": 12,
      +                "minimum": -60,
      +                "type": "number"
      +              },
      +              {
      +                "enum": [
      +                  "-inf",
      +                  "off"
      +                ],
      +                "type": "string"
      +              }
      +            ],
      +            "default": 0
      +          },
      +          "description": "{\"i3\": -3}",
      +          "propertyNames": {
      +            "pattern": "^i?\\d{1,2}$"
      +          },
      +          "type": "object"
      +        },
      +        "level": {
      +          "anyOf": [
      +            {
      +              "maximum": 6,
      +              "minimum": -60,
      +              "type": "number"
      +            },
      +            {
      +              "enum": [
      +                "-inf",
      +                "off"
      +              ],
      +              "type": "string"
      +            }
      +          ],
      +          "default": 0
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "remove": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "replace": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / plan
      Added value: +{
      +  "additionalProperties": true,
      +  "description": "Alone: {bpm, meter, key, peak, sections:[{id, bars, energy 1-5, role}], mix?} gives a skeleton, timing, checks",
      +  "type": "object"
      +}
  14. Changed3 schema fields changed
    • changedInput schema / description
      Previous value: -"Schema d568427c"New value: +"Schema 415a8741"
    • addedInput schema / properties / intent
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Deliberate choices, not scored",
      +  "properties": {
      +    "fixed": {
      +      "items": {
      +        "enum": [
      +          "tempo",
      +          "swing",
      +          "meter",
      +          "length",
      +          "form",
      +          "loop"
      +        ],
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "loop": {
      +      "type": "boolean"
      +    },
      +    "unpitched": {
      +      "description": "Drum tracks",
      +      "items": {
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / voices
      Added value: +{
      +  "description": "List these instruments' settings",
      +  "items": {
      +    "maximum": 99,
      +    "minimum": 1,
      +    "type": "integer"
      +  },
      +  "maxItems": 16,
      +  "type": "array"
      +}
  15. Changed1 schema field changed
    • changedInput schema / description
      Previous value: -"Schema 90ddc268"New value: +"Schema d568427c"
  16. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"Schema 90ddc268"
  17. First observed

TDQS

A3.6/5.0
Behavior1/5

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

Annotations declare readOnlyHint=true and destructiveHint=false, but the description describes write/fix stages, batch edits via layers that return an edited song, stored working copies, share links, and render assets. That directly contradicts the read-only annotation, so this scores 1 despite otherwise rich details about 90-day links, 2-hour refs, and length warnings.

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

Conciseness3/5

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

The main purpose is front-loaded, but the description becomes a dense run-on covering syntax, stages, note release/EC effects, link lifetime, and conversion. It repeats schema-level details and includes material that describe(topic="syntax") is supposed to carry, reducing concision.

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 20-parameter nested tool with no output schema, it covers the main workflow, return/share-link behavior, working-copy lifetime, analysis modes, and constraints on rendering. Some output and permission details are thin, but the major operational context is present.

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 coverage is 100%, so the schema already documents all 20 parameters; the description mostly repeats the plan/analyze/deep/layers semantics. It adds MTL syntax and note-stopping details, but little parameter-specific meaning beyond what the schema supplies.

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 opens with a specific verb stack—plans, analyzes, checks, and optionally renders—and the resource, a song in MTL text. It also distinguishes sibling paths: describe(topic="syntax") for grammar, convert for MIDI/tracker modules, and render only when an audio file is requested.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a staged workflow (plan, write, light analysis loop, one deep analysis, fix, share link) and explicit conditions: analyze:true is repeatable, deep:true is for once or twice when nearly done, and render only on user request. It also routes the agent to describe for syntax and convert when working in another program.

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