♩Clef:

spell_piano_chord: list the notes of a chord

List the notes of one chord symbol as piano pitches with octave and MIDI number. Part of the Clef Music Tools MCP server. Endpoint: https://clefdrills.com/mcp, no account needed, read-only.

What it does

spell_piano_chord spells one chord symbol as piano pitches, lowest note first, each with its note name, accidental, octave and MIDI number. Use it to answer "what notes are in this chord" or to feed the notes to a MIDI tool.

It spells the chord only. It does not choose a voicing, an arrangement or a rhythm. A slash chord puts the bass note below the chord.

Input schema

{
  "symbol": string, 1 to 40 characters, one chord symbol such as "Cmaj7" or "F#m7b5"
  "octave": integer, 1 to 6, default 4 (octave of the chord root)
}

All fields are validated before the tool runs.

Output

On success: structuredContent with notes, an array of { midi, name, letter, accidental, octave }, and browserTool (https://clefdrills.com/tools/piano-chord-finder/).

Example calls

Major seventh in the default octave

curl -s https://clefdrills.com/mcp \
  -H 'content-type: application/json' \
  -H 'accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"spell_piano_chord","arguments":{"symbol":"Cmaj7","octave":4}}}'

Result:

{ "notes": [
    { "midi": 60, "name": "C4", "letter": "C", "accidental": "", "octave": 4 },
    { "midi": 64, "name": "E4", "letter": "E", "accidental": "", "octave": 4 },
    { "midi": 67, "name": "G4", "letter": "G", "accidental": "", "octave": 4 },
    { "midi": 71, "name": "B4", "letter": "B", "accidental": "", "octave": 4 }
  ],
  "browserTool": "https://clefdrills.com/tools/piano-chord-finder/" }

Dominant seventh, lower octave

curl -s https://clefdrills.com/mcp \
  -H 'content-type: application/json' \
  -H 'accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"spell_piano_chord","arguments":{"symbol":"G7","octave":3}}}'

Result:

{ "notes": [
    { "midi": 55, "name": "G3", "letter": "G", "accidental": "", "octave": 3 },
    { "midi": 59, "name": "B3", "letter": "B", "accidental": "", "octave": 3 },
    { "midi": 62, "name": "D4", "letter": "D", "accidental": "", "octave": 4 },
    { "midi": 65, "name": "F4", "letter": "F", "accidental": "", "octave": 4 }
  ],
  "browserTool": "https://clefdrills.com/tools/piano-chord-finder/" }

Slash chord

curl -s https://clefdrills.com/mcp \
  -H 'content-type: application/json' \
  -H 'accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"spell_piano_chord","arguments":{"symbol":"C/E"}}}'

Result:

{ "notes": [
    { "midi": 52, "name": "E3", "letter": "E", "accidental": "", "octave": 3 },
    { "midi": 60, "name": "C4", "letter": "C", "accidental": "", "octave": 4 },
    { "midi": 67, "name": "G4", "letter": "G", "accidental": "", "octave": 4 }
  ],
  "browserTool": "https://clefdrills.com/tools/piano-chord-finder/" }

Edge cases and errors

  • octave is optional and defaults to 4. F#m7b5 with no octave returns F#4, A4, C5, E5 (MIDI 66, 69, 72, 76): notes keep rising from the root, so upper notes can sit in the next octave.
  • Suspended chords are supported: Dsus4 returns D4, G4, A4 (MIDI 62, 67, 69).
  • In a slash chord the bass note is placed below the root: C/E returns E3 first, then C4 and G4.
  • An unsupported or misspelled symbol such as Hzz fails with Invalid chord symbol. An octave above 6 is rejected by validation.

Errors come back as a normal tool result with isError: true, so the client can show the message. Real error results from the live server:

arguments: {"symbol":"Hzz"}

{ "isError": true, "content": [{ "type": "text", "text": "Invalid chord symbol" }] }
arguments: {"symbol":"C","octave":9}

{ "isError": true, "content": [{ "type": "text", "text": "MCP error -32602: Input validation error: Invalid arguments for tool spell_piano_chord: Number must be less than or equal to 6 at octave" }] }

Related pages