add_marking
Places a dynamic or tempo marking at a chosen bar, staff, and beat without using Dorico’s popover, then verifies the new event was selected; set pickup when the flow starts with an upbeat.
Instructions
Write a dynamic or a tempo at a bar, staff and beat, without the popover.
Returns:
Result dictionary with the command sent and ``verified`` when Dorico
selected a newly created event of the expected type.
Note:
Places the caret the way goto_bar does, then sends the popover's command
with the text as ``Definition``: Dorico creates the item directly and
selects it (Dorico Elements 6.2.40, dynamic measured and checked in an
exported PDF). Mind the pickup flag: without it a flow that opens with a
pickup gets the marking one bar early. Note input is left afterwards.
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": {
"kind": "<kind>",
"text": "<text>",
"bar": "<bar>"
},
"name": "add_marking"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bar | Yes | Bar number, counted from 1, so bar 1 is the first bar of the flow. Not an index. | |
| beat | No | Beat in the bar, 1-based. | |
| kind | Yes | dynamic (mf, sfz, ff) or tempo. | |
| text | Yes | What you would type in Dorico's popover: 'mf', 'pp<', 'Allegro q=120'. | |
| staff | No | Staff index, counted from 0, where 0 is the topmost staff in the current layout. Counted differently from a bar number on purpose: bars start at 1, staves at 0. | |
| pickup | No | True when the flow starts with a pickup (upbeat) bar. Dorico does not number it as bar 1, so bar navigation lands one bar short without this. Nothing in the API reveals a pickup, so ask the person whose score it is, or read an exported MusicXML file with read_score. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||