You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Default get_calendar_events to all enabled accounts (#59) (#60)
* Default get_calendar_events to all enabled accounts (#59)
get_calendar_events threw "accountId is required" when both accountId
and calendarId were omitted, even though accountId is schema-optional
and sibling read tools (search_emails, list_calendars, get_emails,
get_contacts) default to querying all accounts. This inconsistency read
as a bug and was a top tool-call failure for consuming agents.
When neither accountId nor calendarId is supplied, query all enabled
accounts instead of throwing, mirroring list_calendars. The existing
parallel fan-out and per-account warning aggregation already looped over
validAccounts, so accounts that don't support calendar degrade into a
warning. Bumps version to 1.3.4.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Pin k8s deployment image to 1.3.4
Replace the floating :latest tag with the explicit 1.3.4 tag so the
deployed version is unambiguous and matches the image pushed for #59.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Update calendar guide: get_calendar_events defaults to all accounts
The GetGuide calendar.md skill still said accountId was required unless
calendarId resolved one account. Align it with the #59 behavior change:
omitting accountId now fans out across all enabled accounts.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: src/CalendarMcp.Core/Tools/GetCalendarEventsTool.cs
+23-11Lines changed: 23 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -18,24 +18,30 @@ public sealed class GetCalendarEventsTool(
18
18
IProviderServiceFactoryproviderFactory,
19
19
ILogger<GetCalendarEventsTool>logger)
20
20
{
21
-
[McpServerTool,Description("Get calendar events for a date range from a specific account. The timeZone parameter is required. The accountId parameter is required unless calendarId uniquely identifies a calendar across all accounts, in which case the account is resolved automatically. Returns events sorted by start time, each with: id, accountId, calendarId, subject, start/end in both UTC and local time, timezone, location, attendees, isAllDay, organizer. Use the returned accountId and id when calling delete_event, respond_to_event, or get_calendar_event_details.")]
21
+
[McpServerTool,Description("Get calendar events for a date range from one or all accounts. The timeZone parameter is required. Omit accountId (and calendarId) to query all enabled accounts at once; provide accountId to scope to one account, or provide calendarId alone to resolve the account automatically when it uniquely identifies a single account. Returns events sorted by start time, each with: id, accountId, calendarId, subject, start/end in both UTC and local time, timezone, location, attendees, isAllDay, organizer. Use the returned accountId and id when calling delete_event, respond_to_event, or get_calendar_event_details.")]
22
22
publicasyncTask<string>GetCalendarEvents(
23
23
[Description("IANA timezone name for displaying event times (e.g. `America/Chicago`, `America/New_York`, `Europe/London`, `Asia/Tokyo`). All event times are returned in both UTC and this local timezone. Required.")]stringtimeZone,
24
24
[Description("Start of the date range (ISO 8601 format, e.g. `2026-02-20`). Defaults to today.")]DateTime?startDate=null,
25
25
[Description("End of the date range, inclusive (ISO 8601 format, e.g. `2026-02-27`). Defaults to 7 days after startDate.")]DateTime?endDate=null,
26
-
[Description("Account ID to query. Obtain from list_accounts. Required unless calendarId uniquely identifies a single account.")]string?accountId=null,
26
+
[Description("Account ID to query, or omit to query all enabled accounts. Obtain from list_accounts.")]string?accountId=null,
27
27
[Description("Calendar ID to query, or omit for all calendars. Obtain from list_calendars. If accountId is omitted, calendarId is used to identify the account automatically when it exists in exactly one account.")]string?calendarId=null,
28
28
[Description("Maximum number of events to return per account (default 50)")]intcount=50)
29
29
{
30
30
vartz=TimeZoneHelper.TryGetTimeZone(timeZone);
31
31
if(tz==null)
32
32
thrownewMcpException($"Invalid IANA timezone: '{timeZone}'. Use a valid IANA timezone name such as 'America/Chicago', 'Europe/London', or 'Asia/Tokyo'.");
33
33
34
-
if(string.IsNullOrEmpty(accountId))
34
+
// Determine which accounts to query (mirrors search_emails / list_calendars):
0 commit comments