Edit score
edit_scoreApply one reversible score edit. Invalid IDs and stale edits are refused. A pitch edit with request_id can use an older revision of a notation-played score without repeats when its bars and dependencies are unchanged. Re-engraving and whole-score rhythm edits replace note IDs. No credits.
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": {
"score_id": "<score_id>",
"revision": "<revision>",
"operation": "<operation>"
},
"name": "edit_score"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| revision | Yes | ||
| score_id | Yes | ||
| operation | Yes | Give one action (? optional): entry: create_tuplet {note_id,actual 2..9,normal?}; rewrite_tuplet {note_id,pattern:three_equal|long_short|short_long|one_note|one_rest OR written_quarters (written before 3:2)} keeps its span; one_note needs a first attack and rests; replace_note {note_id,pitch|null,spelling?} keeps its slot; remove_tuplet {note_id} expands into following rests; paste_notes {source_note_ids,target_note_id} copies a whole span or a chord/rest to another slot in the same triplet, keeping target rhythm; set_tie {note_ids:[start,end],enabled}; set_slur {note_ids:[start,end],enabled}; reflow_layout {}. notes: set_pitch {note_ids,pitch,spelling?} (nearest octave if omitted: B4 -> C5, not C4; respect direction and say the pitch written); transpose {note_ids,semitones}; set_duration {note_ids,quarters} (one note, tied pair or chord); move_notes {note_ids,quarters ±} (any notes of one part, each in its voice); time: shift_time {measure,onset? quarters from bar start|note_id,quarters ±,part_id?,staff?} shifts later attacks; negative removes beats before the point and empty tail bars. voices: set_voice {note_ids,voice 1..4 on their staff}; set_tie also between voices; set_beam {note_ids,beam join|break|none|auto}; set_stem {note_ids,stem up|down|flip|auto}; set_visibility {note_ids (rests)|measures,staff?,visible}. batch {operations:[...up to 30 of the note, time, voice and bar edits]}: one version, all or none. delete_notes {note_ids} turns sounding notes into rests and clears selected rest symbols, moving no later note; set_staff {note_ids|select,staff 1 upper|2 lower,clef? if asked}; add_chord_tone {note_id,pitch,spelling?,velocity?}; fill_rest {rest_id,pitch,quarters?,velocity?,spelling?}. sound: set_velocity {note_ids,velocity 1..127}; set_dynamic {note_id,mark ppp..fff|sf|sfz|fp,velocity?}; set_timbre {part_id,program,part_name?}; delete_part {part_id} (not the last part); share_staff {part_ids 2..4 adjacent,shared} (合谱). writing: set_key {part_id?,fifths,mode} (respells without repitching); set_clef {part_id?,staff?,clef,measures?} (no measures: the whole staff; "4": from bar 4 to the staff's next clef change; "4-6": those bars only); set_harmony_position {part_id,measure,index from 0,quarters from bar start}; engraving {title?,composer?,transcriber?,labels?:compact|full|none,page_size?:a4|letter} (paper reflows pages and PDF); rebeam {}; reengrave {key?,program?,staff_split?,voices?,grid?,line?:single} (from recording; IDs can change). page layout, all views: layout {bars_per_system? 1..32,system_breaks? ["bar"],page_breaks? ["bar"],staff_size? 50..150 %,staff_spacing? 0..48,system_spacing? 0..48,lyric_spacing? -1..5 mm,reset?:true}; null resets one field. Only breaks in edited MusicXML are read. TAB: set_tablature {part_id?,view off|both|tab,tuning?,capo?,strings?}; set_string {note_ids,string|null}; set_fret {note_ids,string,fret}; set_chord_frets {note_id,frets} top TAB line first (0 open, null leaves string alone); set_chord_tie {note_ids:[start,end],enabled} one ID from each matching adjacent chord. marks (saved score marks; kind words|rehearsal|metronome|dynamic|hairpin|fermata|octave (8va|8vb|15ma|15mb, note_id through end_note_id)): add_mark {kind,note_id|part_id+measure+quarters,text?,value?,end_note_id?,placement?}; update_mark {mark_id,kind?,text?,value?,placement?,offset_y? (fermata height in tenths; +10 up one space, 0 resets)}; move_mark {mark_id,note_id?,end_note_id?}; delete_mark {mark_id}. whole score: transpose_score {interval as M2, -m3 or P8}; set_meter {beats,beat_type,pickup_quarters?}; scale_note_values {factor:2|0.5}; rewrite_rhythm {bpm,beats,beat_type,downbeat? second a bar starts: bars start there} (steady recording); rebeat {bpm,beats,beat_type,downbeat seconds,swing? 0.5..0.75} (wrong tracked piano beat); rebar_pickup {quarters}; set_pickup {enabled} (marks a short first bar, moves no barline); pad_measure {part_id,measure}; repair_bindings {}; undo {}; redo {}. bars (every part; numbers as printed): insert_measures {before "bar"|null=at end,count? 1..16}; delete_measures {from,to?}. recording alignment: set_recording_alignment {measure_id,visit?:1,anchors:[[zero-based quarter beats within bar,recording seconds],...]} (2..64 increasing points; [] clears). Only for comparison/listening. | |
| request_id | No | A stable ID (16 to 80 letters, digits or hyphens); send the same one again after an unclear response. For pitch edits with 1 to 64 note IDs or chord edits at the current revision. |