Chord check: identify, spell, key membership, transpose
Names a chord from its notes, spells a chord symbol into notes, tests whether a chord is diatonic to a key, or transposes a chord symbol, using pitch-class arithmetic over a fixed table of 21 chord qualities, for agents handling lead sheets and music metadata. Rule-based and labelled: when several readings are equally valid (C E G A is C6 or Am7/C) or no quality in the table matches, it returns unknown with the candidates instead of choosing. Does NOT use harmonic context, analyse progressions, infer keys, or know quality names outside its table.
What you get
Stops an agent asserting a chord name or key the notes do not support.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/chord-check. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.
curl -i -X POST https://agents.writerslogic.com/api/v1/chord-check \
-H 'content-type: application/json' \
-d '{"operation":"spell","chord":"Ebmaj7","expectNotes":["Eb","G","Bb","D"]}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
operation | string; one of "identify", "spell", "key-membership", "transpose" | yes | |
notes | array<string; length 0..6>; max 8 items | no | For identify: 2 to 8 notes. |
chord | string; length 0..24 | no | Chord symbol, root A-G with optional #/b, quality suffix, optional /bass: Cmaj7, F#m7b5, Bb/D. |
key | object | no | For key-membership. |
semitones | integer; -48..48 | no | For transpose: semitones up (negative down). |
prefer | string; one of "sharps", "flats" | no | Accidentals for a natural root when transposing. Default sharps; a root written with # or b keeps its kind. |
expectChord | string; length 0..24 | no | Optional claimed chord symbol to verify (identify, transpose). |
expectNotes | array<string; length 0..4>; max 8 items | no | Optional claimed notes in order, to verify (spell). |
Example request body
{
"operation": "spell",
"chord": "Ebmaj7",
"expectNotes": [
"Eb",
"G",
"Bb",
"D"
]
}
Result
The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass. |
operation | string | no | |
chord | string; length 0..200 | no | Normalised chord symbol. |
readings | array<object> | no | |
notes | array<string> | no | Spelled chord tones, bass first when it is not a chord tone. |
pitchClasses | array<integer> | no | Sorted pitch classes, C = 0. |
diatonic | boolean | no | |
outOfKey | array<string> | no | |
degree | integer | no | Scale degree of the chord root when it is in the scale. |
scale | array<string> | no | |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always true: pure code, no model. |
Pay and connect
Available through: x402 (USDC on Base), MCP. MCP clients reach it through the creative-games-kit package.
Machine-readable
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent