Get the marker nearest to a time
get_nearest_markerFind the marker closest to a specified time or the playhead without moving it, optionally restricting the search to before or after, and return its offset and span status.
Instructions
Find the marker closest to a time (default: the playhead) without moving the playhead. direction limits the search to markers at or before / at or after that time. Returns found, marker, offset (marker time minus the time, in seconds) and inside_marker (the time lies within the marker's span). Use go_to_next_marker / go_to_previous_marker to move the playhead instead.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_nearest_marker"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Only markers whose name or comment contains this text (plain substring, case-insensitive). | |
| time | No | Time to measure from, in seconds. Default: the playhead position. | |
| type | No | Only markers of this type. One of "comment", "chapter", "segmentation", "web_link". | |
| color | No | Only markers of this colour. Colour index or name: 0 green, 1 red, 2 purple, 3 orange, 4 yellow, 5 white, 6 blue, 7 cyan. | |
| to_time | No | Only markers that start at or before this sequence time, in seconds. | |
| direction | No | "nearest" (default), "before" (at or before the time) or "after" (at or after the time). | |
| from_time | No | Only markers that start at or after this sequence time, in seconds. | |
| sequence_id | No | Stable sequence id (from list_sequences). Omit to use the active sequence. | |
| sequence_name | No | Sequence name; used only when sequence_id is not given. |