Skip to main content
Glama

play_melody

Generate and play a stepwise melody through a chosen scale that resolves on the tonic.

Instructions

Generate and play a melody that moves mostly stepwise through a scale and ends on the tonic.

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": "play_melody"
  }
}

Input Schema

NameRequiredDescriptionDefault
rootNoTonic such as D, F#3 or Bb4; random if omitted
seedNoRandom seed for a reproducible result; omit for a new one
notesNoNumber of notes
scaleNomajor
synthNopluck
tempoNoBeats per minute
volumeNoLoudness, 0..1
effectsNoOptional effect chain

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, and destructiveHint=false, so the side-effecting, non-repeatable nature is structured data. The description adds genuine value by disclosing the melodic constraint (stepwise motion, tonic ending), which tells the agent what the generated material will sound like. It does not say that playback occurs immediately on call or how long the audio lasts, which are the remaining behavioral unknowns.

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?

A single well-formed sentence with no filler, front-loading the action and immediately qualifying the output character. Nothing could be removed without losing information.

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?

With eight optional parameters, an output schema, and rich annotations, the definition is minimally adequate, and it correctly omits return-value explanation. However, it leaves out sibling routing and playback behavior (immediate, non-idempotent, duration tied to notes and tempo), which are exactly the gaps the surrounding siblings make costly.

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 75%, so the parameters are largely self-documenting; the baseline of 3 applies. The description's references to scale and tonic echo what root and scale already declare without adding format or interaction detail, and it says nothing about notes, tempo, synth, or effects.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb pair ('Generate and play') and a concrete resource ('a melody'), and adds a useful characterization of the output: mostly stepwise motion through a scale, cadencing on the tonic. It never distinguishes itself from siblings such as play_synth, create_sequence, or create_generative_rhythm, so an agent must infer the boundary itself.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no exclusions, and no mention of alternatives, despite a crowded sibling set of overlapping audio-generation tools. An agent only gets an implied 'use this to make a melody' signal with nothing about when a sequence or synth tool would be a better fit.

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