Plan focus session
plan_focus_sessionUse this when the user wants pomodoros fitted into a time window: "I have 3 hours to study until 5pm", "plan pomodoros from 9:00 to 12:30 with a lunch break", "how many 50/10 blocks fit before my 3pm meeting". Fits the most whole focus blocks between the start and end time around fixed breaks (if the standard long break would cost a block, it shortens or drops it and says so, unless the user gave long-break settings) and returns clock times for every block, total focus minutes, spare time, an .ics calendar file with one event per focus block, and a live timer for the plan. Limits: one window of up to 24 hours; it does not read or change the user's calendar and does not build multi-day study plans (e.g. finals week).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Date of the session as YYYY-MM-DD, e.g. 2026-10-02. Defaults to today in time_zone. | |
| label | No | Topic used for calendar event titles, e.g. "Study: organic chemistry". Default "Focus". | |
| breaks | No | Fixed breaks the plan must avoid, e.g. [{"start":"12:00","end":"12:45","label":"Lunch"}]. | |
| rounds | No | Maximum number of pomodoros to schedule, e.g. 6. Without an end time the plan runs until this many are done. | |
| end_time | No | When the session must end, e.g. 17:00 or 5pm (for "until 5pm"). Earlier times mean the next day; equal start and end times are refused. A bare hour such as 5 after a 14:00 start is read as 5pm, with a note; use 05:00 for next-day 5am. | |
| time_zone | No | Time zone of the clock times: an IANA name (e.g. Europe/Warsaw), a city (e.g. New York), or an abbreviation (e.g. EST). With a zone, calendar events use absolute timestamps. With an explicit date and no zone, events use floating local time. If both date and zone are omitted, today's date and clock times use America/New_York, with a note. | |
| start_time | No | When the session starts, as HH:MM or 9:00 am, e.g. 09:00. Needed unless end_time is given with available_minutes or rounds. | |
| work_minutes | No | Focus block length in minutes, e.g. 25 (default) or 50. | |
| long_break_every | No | Long break after this many focus blocks, e.g. 4 (default). 0 = never. Leave unset unless the user asks. | |
| available_minutes | No | Total time available in minutes, e.g. 180 for "I have 3 hours". Used with start_time or end_time. Max 1440. | |
| long_break_minutes | No | Long break in minutes, e.g. 15. Leave unset unless the user asks for one: by default it is 15 and may be shortened when that fits an extra focus block. | |
| short_break_minutes | No | Break between focus blocks in minutes, e.g. 5 (default) or 10. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| label | Yes | ||
| notes | Yes | ||
| phases | Yes | ||
| totals | Yes | ||
| summary | Yes | ||
| schedule | Yes | ||
| settings | Yes | ||
| downloads | Yes | ||
| phase_count | No | ||
| spare_minutes | Yes | ||
| phases_truncated | No |