Skip to main content
Glama
deciduus
by deciduus

Book focus time

block_focus_time

Book focus time by filling available free calendar blocks until requested hours are met; preview with dry run before creating busy events.

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. Both preview and booking fail before writing if any checked calendar has unknown availability. The destination calendar is always checked too.

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

TableJSON Schema
NameRequiredDescriptionDefault
titleNoFocus time
accountNo
dry_runNo
time_maxYes
time_minYes
calendar_idNo
descriptionNo
hours_neededYes
check_calendar_idsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoNumber of blocks.
eventsNoThe blocks, earliest first.
dry_runNoTrue when nothing was written to the calendar.
messageNoOne-line human-readable summary.
time_maxYesEnd of the searched window, ISO 8601.
time_minYesStart of the searched window, ISO 8601.
timezoneYesTimezone the blocks are expressed in.
satisfiedNoTrue when hours_booked covers hours_needed.
calendar_idYesCalendar the blocks were booked on.
hours_bookedNoFocus hours actually covered by these blocks.
hours_neededNoFocus hours the caller asked for.
total_free_hoursNoFocus hours that were available in the window.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations it discloses rich behavior: events are created busy, with reminders off, and without notifying attendees; the final block is trimmed rather than overshooting; both preview and booking fail before writing if any checked calendar has unknown availability; the destination calendar is always checked. These are exactly the side-effects an agent needs to warn the user about.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then behavioral traits, then a dry_run usage rule, then a scannable Args block. Every sentence adds information; nothing is padded or restated from the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With nine parameters and an output schema present, the description covers what an agent needs: booking algorithm, trimming behavior, failure preconditions, privacy behavior, and full parameter semantics. Return-value explanation is correctly omitted since an output schema exists.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full load and does it well. The Args section documents all nine parameters, including defaults ('Focus time'), omission semantics ('Omit for the user's configured focus_calendar_id'), and cross-references to `get_preferences` and the accounts command.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Book the best free blocks ... as focus time') and ties itself to the sibling it builds on ('Takes the blocks `find_focus_time` would report'). An agent can distinguish this booking tool from `find_focus_time` and `create_event` without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly names the related sibling and the key workflow condition: 'Run it with `dry_run` first when the user has not yet agreed to the times.' It also documents the failure precondition (unknown availability aborts the write). It stops short of explicitly routing away from alternative booking tools like `create_event` or `schedule_mutual`.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.