Call a libcantus theory function
theory_lookupCall one libcantus music-theory function by name, such as chord parsing, transposition or interval math, and get the library's result unchanged. Use it to compute theory values from plain data.
Instructions
Calls one libcantus music-theory function by its Python name with arguments by parameter name and returns the library's result unchanged under 'result' (libcantus's own camelCase keys). Covers chord and key parsing and spelling, scales, intervals, Roman numerals, chord scales, substitutions, key relations, transposition, note, MIDI and frequency conversion, instrument ranges, tempo and duration math, and generators that take plain data. List the functions and their parameters with music_catalog kind 'theoryOps'. Functions that need handles, callbacks or model instances are refused; use theory_analyze, theory_check or midi_compose for those. Example: {"op": "transpose_chord_symbol", "args": {"text": "Am7", "semitones": 2}}.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"op": "<op>"
},
"name": "theory_lookup"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | libcantus function name, e.g. 'parse_chord_symbol' or 'transpose_chord_symbol'; list them with music_catalog kind 'theoryOps'. | |
| args | No | Arguments by parameter name, as music_catalog kind 'theoryOps' lists them. An omitted optional parameter takes the library's own default; null is passed as null. A variadic parameter takes a JSON array. A 'bars' value is at most 128. | |
| detail | No | 'concise' returns the summary and the most useful fields; 'full' returns all. | concise |