Repository navigation
Conversation
hey mcp served calendars and todos, but none of the other calendar work the CLI already does: an agent connected over MCP could not start or stop a time track, tick off a habit, or write the day's journal entry. Those tags were left unmapped, and catalog_test pinned them that way. hey-sdk models all four groups as plain JSON operations, so the generic dispatcher drives them unchanged. This maps them in DomainSpecs: - hey_timetracks: Calendar Time Tracks (start, ongoing, stop via update_time_track's ends_at, create, list, edit, delete, categories) - hey_habits: Calendar Habits (create, update, stop, resume, delete, complete and uncomplete a day) - hey_journal: Calendar Journal (list, read and write a day's entry) - hey_calendar gains Calendar Periods: a day, week or year as HEY draws it, the only read that expands repeating events and carries habits Calendar Events stays unmapped. The model has only its two deletes; create and update are hey-sdk's "phase-2: calendar events" excluded routes, reached by the CLI through hand-written form posts the catalog cannot see. docs/agents.md says so and points at hey event add/edit. Refs basecamp#537 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
2 issues found across 6 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="internal/mcpserver/domains.go">
<violation number="1" location="internal/mcpserver/domains.go:43">
P2: This implies year reads also include expanded occurrences and habits, but `GetCalendarYear` returns only the year grid and spanning events. Scope the occurrence and habit details to day/week reads, and describe the year response as a grid.</violation>
<violation number="2" location="internal/mcpserver/domains.go:48">
P3: The timetracks blurb promises "list, edit or delete completed tracks and categories", but the API model offers no create/update/delete actions for categories — the only category operation is `ListTimeTrackCategories` (`GET /calendar/time_tracks/categories.json`). An agent reading the tool description could attempt a category delete/edit action that does not exist. Reword so edit/delete applies only to tracks.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| Tags: []string{"Calendars"}, | ||
| Blurb: "HEY Calendars: list calendars, read their recordings (todos and events — the todo read path), and toggle calendar visibility.", | ||
| Tags: []string{"Calendars", "Calendar Periods"}, | ||
| Blurb: "HEY Calendars: list calendars, read their recordings (todos and events — the todo read path), toggle calendar visibility, and read a day, week or year as HEY draws it (repeating events expanded into occurrences, plus habits).", |
There was a problem hiding this comment.
P2: This implies year reads also include expanded occurrences and habits, but GetCalendarYear returns only the year grid and spanning events. Scope the occurrence and habit details to day/week reads, and describe the year response as a grid.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At internal/mcpserver/domains.go, line 43:
<comment>This implies year reads also include expanded occurrences and habits, but `GetCalendarYear` returns only the year grid and spanning events. Scope the occurrence and habit details to day/week reads, and describe the year response as a grid.</comment>
<file context>
@@ -40,8 +39,23 @@ var DomainSpecs = []catalog.DomainSpec{
- Tags: []string{"Calendars"},
- Blurb: "HEY Calendars: list calendars, read their recordings (todos and events — the todo read path), and toggle calendar visibility.",
+ Tags: []string{"Calendars", "Calendar Periods"},
+ Blurb: "HEY Calendars: list calendars, read their recordings (todos and events — the todo read path), toggle calendar visibility, and read a day, week or year as HEY draws it (repeating events expanded into occurrences, plus habits).",
+ },
+ {
</file context>
| Blurb: "HEY Calendars: list calendars, read their recordings (todos and events — the todo read path), toggle calendar visibility, and read a day, week or year as HEY draws it (repeating events expanded into occurrences, plus habits).", | |
| Blurb: "HEY Calendars: list calendars, read their recordings (todos and events — the todo read path), toggle calendar visibility, read days and weeks with repeating events expanded into occurrences and habits, and read a year as HEY draws its grid.", |
| { | ||
| Key: "timetracks", | ||
| Tags: []string{"Calendar Time Tracks"}, | ||
| Blurb: "HEY Calendar time tracks: start tracking, read the ongoing track, stop it (update_time_track with ends_at, optionally filing it under a category_title), record a finished stretch, and list, edit or delete completed tracks and categories.", |
There was a problem hiding this comment.
P3: The timetracks blurb promises "list, edit or delete completed tracks and categories", but the API model offers no create/update/delete actions for categories — the only category operation is ListTimeTrackCategories (GET /calendar/time_tracks/categories.json). An agent reading the tool description could attempt a category delete/edit action that does not exist. Reword so edit/delete applies only to tracks.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At internal/mcpserver/domains.go, line 48:
<comment>The timetracks blurb promises "list, edit or delete completed tracks and categories", but the API model offers no create/update/delete actions for categories — the only category operation is `ListTimeTrackCategories` (`GET /calendar/time_tracks/categories.json`). An agent reading the tool description could attempt a category delete/edit action that does not exist. Reword so edit/delete applies only to tracks.</comment>
<file context>
@@ -40,8 +39,23 @@ var DomainSpecs = []catalog.DomainSpec{
+ {
+ Key: "timetracks",
+ Tags: []string{"Calendar Time Tracks"},
+ Blurb: "HEY Calendar time tracks: start tracking, read the ongoing track, stop it (update_time_track with ends_at, optionally filing it under a category_title), record a finished stretch, and list, edit or delete completed tracks and categories.",
+ },
+ {
</file context>
| Blurb: "HEY Calendar time tracks: start tracking, read the ongoing track, stop it (update_time_track with ends_at, optionally filing it under a category_title), record a finished stretch, and list, edit or delete completed tracks and categories.", | |
| Blurb: "HEY Calendar time tracks: start tracking, read the ongoing track, stop it (update_time_track with ends_at, optionally filing it under a category_title), record a finished stretch, and list, edit or delete completed tracks, and list their categories.", |
There was a problem hiding this comment.
Copilot review overview
🟢 Approved
The mappings reuse the existing dispatcher; remaining feedback concerns minor description corrections and optional regression coverage.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Expands hey mcp to expose existing calendar capabilities through the SDK-backed dispatcher, addressing part of #537.
Changes:
- Adds time-track, habit, and journal tools.
- Adds calendar-period reads to
hey_calendar. - Updates tool-count tests, help, and documentation; event creation/editing remains outside MCP.
[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or rungh pr ready --undo.
Click "Ready for review" or rungh pr readyto reengage.
| File | Description |
|---|---|
| internal/mcpserver/server_test.go | Expects ten gateway tools. |
| internal/mcpserver/domains.go | Maps new domains and calendar-period reads. |
| internal/mcpserver/catalog_test.go | Updates tools and unmapped-tag expectations. |
| internal/cmd/mcp.go | Expands command help. |
| internal/cmd/mcp_test.go | Updates integration tool count. |
| docs/agents.md | Documents added tools and event-write limitations. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| Tags: []string{"Calendars"}, | ||
| Blurb: "HEY Calendars: list calendars, read their recordings (todos and events — the todo read path), and toggle calendar visibility.", | ||
| Tags: []string{"Calendars", "Calendar Periods"}, | ||
| Blurb: "HEY Calendars: list calendars, read their recordings (todos and events — the todo read path), toggle calendar visibility, and read a day, week or year as HEY draws it (repeating events expanded into occurrences, plus habits).", |


Part of #537.
hey mcpserved calendars and todos, but none of the other calendar work the CLI already does. An agent connected over MCP could not start or stop a time track, tick off a habit, or write the day's journal entry, because those tags were left unmapped (catalog_test.gopinned them that way, as #357 intended: "growing the surface is a one-line change").hey-sdk models all four groups as plain JSON operations, so the generic dispatcher drives them unchanged. This PR maps them in
DomainSpecs:hey_timetracks(new)start_time_track,get_ongoing_time_track,update_time_track(stop by sendingends_at, optionally filing undercategory_title),create_time_track,list_time_tracks,delete_time_track,list_time_track_categorieshey_habits(new)create_habit,update_habit,stop_habit,resume_habit,delete_habit,complete_habit,uncomplete_habithey_journal(new)list_journal_entries,get_journal_entry,update_journal_entryhey_calendar(extended)get_calendar_day,get_calendar_week,get_calendar_year,list_calendar_days,list_calendar_weeks: the only reads that expand repeating events and carry habitsThe journal blurb warns that a write replaces the whole entry and empty content deletes it, since the action name doesn't say so.
Calendar Events stays unmapped. The model has only its two deletes. Create and update are hey-sdk's
"phase-2: calendar events"excluded routes, which the CLI reaches through hand-written form posts the catalog can't see.docs/agents.mdnow says so and points athey event add/edit. Event writes (#537's second ask) need hey-sdk to model those routes first; basecamp/hey-sdk#230's open-world trait seems relevant there, since--invitesends mail.Changes
internal/mcpserver/domains.go: three new domains, plus Calendar Periods incalendarcatalog_test.go,server_test.go,cmd/mcp_test.go: 10 tools; unmapped list nowAttachments, Bulk Reply, Calendar Events, Clips, …hey mcp --helpanddocs/agents.md: name the new domains and the event gapTesting
make checkis green: fmt, vet, golangci-lint (0 issues), unit tests, surface and lockstep checks.hey mcpover stdio:list_time_tracks(paginated,next_pagereturned),list_time_track_categories,get_ongoing_time_track(404 when nothing is running, as documented),get_calendar_day,get_calendar_week,list_calendar_weeks,get_calendar_year,list_journal_entries,get_journal_entry.create_habit→complete_habit→uncomplete_habit→delete_habiton a throwaway habit, confirmed gone from the week afterwards.🤖 Generated with Claude Code
Summary by cubic
Adds MCP tools for the calendar work
hey mcpwas missing: time tracks, habits, journal, and calendar periods. An agent can now start and stop time tracks, tick off habits, and read or write journal entries over MCP.hey_timetracks,hey_habits, andhey_journal, plus Calendar Periods (day, week, year) underhey_calendar— the only reads that expand repeating events and carry habits.docs/agents.mdnow directs tohey event add/edit.Part of #537.
Written for commit 6812e95. Summary will update on new commits.