Start a training block
add_blockPut a training block on the calendar: a named stretch of weeks with one goal — 'Weight loss, 9 Nov to 28 Feb', 'Calf strength', 'Speed & power, 6 weeks'. Use it when the user says what they are working on for a run of weeks, or builds to a race. The sessions themselves are still add_sessions: a block never owns them, it says what the weeks are for. Send weeks (how many it runs) or end_date. Any weekday may start it. Blocks may run alongside each other, but a day has one main block: with main true this refuses if another main block covers the same days, and names it. Set main false for the one that runs alongside ("strength held at maintenance"). All dates are the user's local calendar dates (YYYY-MM-DD) in their own time zone. Requires signing in.
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": {
"name": "<name>"
},
"name": "add_block"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal | No | One line, e.g. '5 x 1 km at 4:30/km by week 6'. Max 200 characters. Optional. | |
| main | No | True (default) for the block these weeks belong to; false for one running alongside it. | |
| name | Yes | What the user calls it, e.g. 'Weight loss', 'Speed & power'. Max 80 characters. | |
| notes | No | The progression, the weekly rules, what is held at maintenance. Markdown allowed. Optional. | |
| weeks | No | How many weeks it runs from start_date. Send this or end_date. | |
| colour | No | The band's tick colour, from the calendar's session palette. Default 'run'. | |
| race_id | No | The race this block builds to (race_id from get_calendar). Optional. | |
| end_date | No | Last day, YYYY-MM-DD. Send this or weeks. | |
| start_date | No | First day, YYYY-MM-DD. Defaults to today. |