MusicXML Comparer

v0.3.0
io.github.raulkivi/comparer-mcp Checked 4 days ago Published 10 days ago

Music-aware, multi-level comparison of two MusicXML files

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

compare_scores Compare scores (summary, changes, report or full diff)

Music-aware comparison of two MusicXML scores, each given inline or as a file path. `detail` picks how much comes back: 'summary' (default) is the 0-1 similarity score and statistics; 'changes' adds the note-level differences (kind, part, measure, beat, both notes); 'report' adds a human-readable report; 'full' adds the per-part, per-measure diff as well. `parts` (IDs, names or voices) and `measures` ([start, end] printed bar numbers) narrow the comparison, e.g. 'what changed in the Alto, measures 17-24?'. Replaces compare_musicxml, compare_musicxml_files, quick_similarity, list_changes and ge…

ParameterTypeDescription
detailstringHow much to return: summary, changes, report or full.
measuresarrayInclusive [start, end] range of printed measure numbers, e.g. [17, 24]. A pickup bar is 0.
optionsobjectComparison options (docs/architecture.md §8). expand_repeats defaults to false (opt-in — see docs/PLAN.md 'Changed decisions'); normalize_pitch, ignore_articulations, parts, measures all default to…
partsarrayCompare only these parts: part IDs, names or voices (e.g. 'P1', 'Alto', 'A').
reference_pathstringPath to the reference score as a .musicxml, .xml or .mxl file, such as a path another tool returned. Preferred over 'reference_xml': the score is not copied into the conversation. Give this or 'refere…
reference_xmlstringReference MusicXML document as a string. Give this or 'reference_path', not both.
target_pathstringPath to the target score as a .musicxml, .xml or .mxl file, such as a path another tool returned. Preferred over 'target_xml': the score is not copied into the conversation. Give this or 'target_xml',…
target_xmlstringTarget MusicXML document as a string, compared against the reference. Give this or 'target_path', not both.

compare_musicxml Compare scores

Deprecated: use compare_scores(detail="full"). Full music-aware diff of two MusicXML scores, given inline or as file paths. Returns a structured ComparisonResult with global similarity score, summary statistics, and per-part/measure/note detail.

ParameterTypeDescription
optionsobjectComparison options (docs/architecture.md §8). expand_repeats defaults to false (opt-in — see docs/PLAN.md 'Changed decisions'); normalize_pitch, ignore_articulations, parts, measures all default to…
reference_pathstringPath to the reference score as a .musicxml, .xml or .mxl file, such as a path another tool returned. Preferred over 'reference_xml': the score is not copied into the conversation. Give this or 'refere…
reference_xmlstringReference MusicXML document as a string. Give this or 'reference_path', not both.
target_pathstringPath to the target score as a .musicxml, .xml or .mxl file, such as a path another tool returned. Preferred over 'target_xml': the score is not copied into the conversation. Give this or 'target_xml',…
target_xmlstringTarget MusicXML document as a string, compared against the reference. Give this or 'target_path', not both.

compare_musicxml_files Compare score files

Deprecated: use compare_scores(detail="full"). Full music-aware diff of two MusicXML files on disk (.musicxml, .xml, or compressed .mxl). Returns the same structured ComparisonResult as compare_musicxml. Files must be inside the allowed folders (the output folder, the client's roots or SHEET_MUSIC_INPUT_ROOTS).

ParameterTypeDescription
reference_path *stringPath to the reference MusicXML/.mxl file
target_path *stringPath to the target MusicXML/.mxl file, compared against the reference
optionsobjectComparison options (docs/architecture.md §8). expand_repeats defaults to false (opt-in — see docs/PLAN.md 'Changed decisions'); normalize_pitch, ignore_articulations, parts, measures all default to…

quick_similarity Score similarity

Deprecated: use compare_scores(detail="summary"). Fast similarity check between two MusicXML strings: returns only the 0.0-1.0 similarity score and summary statistics, without per-note detail.

ParameterTypeDescription
reference_pathstringPath to the reference score as a .musicxml, .xml or .mxl file, such as a path another tool returned. Preferred over 'reference_xml': the score is not copied into the conversation. Give this or 'refere…
reference_xmlstringReference MusicXML document as a string. Give this or 'reference_path', not both.
target_pathstringPath to the target score as a .musicxml, .xml or .mxl file, such as a path another tool returned. Preferred over 'target_xml': the score is not copied into the conversation. Give this or 'target_xml',…
target_xmlstringTarget MusicXML document as a string, compared against the reference. Give this or 'target_path', not both.

list_changes List score changes

Deprecated: use compare_scores(detail="changes"). List only the note-level differences (operation != MATCH) between two MusicXML strings, optionally filtered to one part and/or a measure range. Useful for targeted queries like 'what changed in the Alto, measures 17-24?'

ParameterTypeDescription
measure_rangearray(Deprecated: use `measures`) [start, end] measure numbers, inclusive.
measuresarrayInclusive [start, end] range of printed measure numbers, e.g. [17, 24]. A pickup bar is 0.
partstringRestrict results to this part: a part ID, name or voice (e.g. 'P1', 'Alto', 'A'). Omit for all parts.
reference_pathstringPath to the reference score as a .musicxml, .xml or .mxl file, such as a path another tool returned. Preferred over 'reference_xml': the score is not copied into the conversation. Give this or 'refere…
reference_xmlstringReference MusicXML document as a string. Give this or 'reference_path', not both.
target_pathstringPath to the target score as a .musicxml, .xml or .mxl file, such as a path another tool returned. Preferred over 'target_xml': the score is not copied into the conversation. Give this or 'target_xml',…
target_xmlstringTarget MusicXML document as a string, compared against the reference. Give this or 'target_path', not both.

generate_comparison_report Comparison report

Deprecated: use compare_scores(detail="report"). Human-readable version comparison report: overall similarity headline, missing/extra parts, missing/extra measures, key/time signature changes, and note-level differences grouped into measure-range summaries (e.g. 'transposed by 3 semitones in measures 17-24').

ParameterTypeDescription
optionsobjectComparison options (docs/architecture.md §8). expand_repeats defaults to false (opt-in — see docs/PLAN.md 'Changed decisions'); normalize_pitch, ignore_articulations, parts, measures all default to…
reference_pathstringPath to the reference score as a .musicxml, .xml or .mxl file, such as a path another tool returned. Preferred over 'reference_xml': the score is not copied into the conversation. Give this or 'refere…
reference_xmlstringReference MusicXML document as a string. Give this or 'reference_path', not both.
target_pathstringPath to the target score as a .musicxml, .xml or .mxl file, such as a path another tool returned. Preferred over 'target_xml': the score is not copied into the conversation. Give this or 'target_xml',…
target_xmlstringTarget MusicXML document as a string, compared against the reference. Give this or 'target_path', not both.

export_annotated_musicxml Export color-annotated diff

Export both scores as MusicXML with per-note color annotations marking the diff (pitch changes, duration changes, substitutions, insertions, deletions): the reference shows deletions and pre-change values, the target insertions and post-change values. Small results come back inline as reference_annotated_musicxml and target_annotated_musicxml; large ones (return: 'auto', the default) are written to files and returned as reference_annotated_musicxml_path and target_annotated_musicxml_path plus a score_summary. Feed the returned paths to render-mcp's render_to_pdf or render_to_image as musicxml_…

ParameterTypeDescription
optionsobjectComparison options (docs/architecture.md §8). expand_repeats defaults to false (opt-in — see docs/PLAN.md 'Changed decisions'); normalize_pitch, ignore_articulations, parts, measures all default to…
reference_pathstringPath to the reference score as a .musicxml, .xml or .mxl file, such as a path another tool returned. Preferred over 'reference_xml': the score is not copied into the conversation. Give this or 'refere…
reference_xmlstringReference MusicXML document as a string. Give this or 'reference_path', not both.
returnstringHow to return the score: 'inline' as MusicXML text, 'path' as a file path plus a short score_summary, 'auto' (default) inline for small scores and a path for large ones. Pass returned paths to other t…
target_pathstringPath to the target score as a .musicxml, .xml or .mxl file, such as a path another tool returned. Preferred over 'target_xml': the score is not copied into the conversation. Give this or 'target_xml',…
target_xmlstringTarget MusicXML document as a string, compared against the reference. Give this or 'target_path', not both.

list_capabilities Comparer capabilities

List supported formats and available tools for this server

health_check Comparer health check

Check that the server and all its dependencies are working correctly. Runs a self-comparison smoke test and returns a structured status summary. Ask your AI assistant to run this tool to confirm the server is set up correctly.

describe_score Describe score

Summarize a score cheaply, without music21 or rendering: title, composer, key, time signature, tempo, parts (ID, name, abbreviation, clef, sounding range), number of measures, whether it has lyrics, and duration in quarter notes and seconds. Returns small JSON and does not return the score itself, so call it first to learn the part IDs and size of a score. Pass musicxml_path (preferred) or musicxml.

ParameterTypeDescription
musicxmlstringMusicXML text of the score. Give this or 'musicxml_path', not both.
musicxml_pathstringPath to the score as a .musicxml, .xml or .mxl file, such as a path another tool returned. Preferred over 'musicxml': the score is not copied into the conversation. Give this or 'musicxml', not both.