Book focus time
block_focus_timeBooks the best available calendar slots as focus time until the required hours are filled, trimming the last block to fit. Use dry run to preview scheduled blocks before writing to the calendar.
Instructions
Book the best free blocks in a window as focus time, until the hours add up.
Takes the blocks find_focus_time would report, longest first, and creates
an event on each until hours_needed is covered. The last block is trimmed
to what is still needed rather than swallowing a whole afternoon. Events are
created busy, with reminders off and without notifying anyone.
Run it with dry_run first when the user has not yet agreed to the times.
Args:
time_min: Start of the window to book inside, ISO 8601.
time_max: End of the window, ISO 8601.
hours_needed: How many focus hours to book.
title: Title for the blocks. Default 'Focus time'.
calendar_id: Calendar to book on. Omit for the user's configured
focus_calendar_id (see get_preferences).
check_calendar_ids: Calendars whose events count as busy. Omit for every
calendar the account has selected.
description: Optional note to put in each block.
dry_run: True to report the blocks that would be booked without writing
anything to the calendar.
account: Account name from 'calendar-mcp accounts'; omit for the default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Focus time | |
| account | No | ||
| dry_run | No | ||
| time_max | Yes | ||
| time_min | Yes | ||
| calendar_id | No | ||
| description | No | ||
| hours_needed | Yes | ||
| check_calendar_ids | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Number of blocks. | |
| events | No | The blocks, earliest first. | |
| dry_run | No | True when nothing was written to the calendar. | |
| message | No | One-line human-readable summary. | |
| time_max | Yes | End of the searched window, ISO 8601. | |
| time_min | Yes | Start of the searched window, ISO 8601. | |
| timezone | Yes | Timezone the blocks are expressed in. | |
| satisfied | No | True when hours_booked covers hours_needed. | |
| calendar_id | Yes | Calendar the blocks were booked on. | |
| hours_booked | No | Focus hours actually covered by these blocks. | |
| hours_needed | No | Focus hours the caller asked for. | |
| total_free_hours | No | Focus hours that were available in the window. |