PrimeCal MCP Tools and Resources
This page documents the canonical PrimeCal MCP surface exposed by the server.
Tool Families
Organisations, Resources, and Reservations
primecal_organisations_listprimecal_organisations_active_setprimecal_organisations_billing_status_getprimecal_organisations_billing_settings_updateprimecal_organisations_stripe_onboardingLink_createprimecal_organisations_payments_debug_getprimecal_resourceTypes_listprimecal_resources_listprimecal_reservations_availability_listprimecal_reservations_listprimecal_reservations_getprimecal_reservations_create
Common input fields:
organisationIdfor active-organisation switching onlyresourceTypeId- optional
resourceId datefor day-level availabilitystartTime/endTimefor reservation creation- optional
status,startFrom, andendTofor reservation listing
Important behavior:
- reservation and resource tools resolve the active organisation from the agent context, not from arbitrary client payloads
- billing and payment-debug tools also use the active organisation, but require explicit organisation scope and organisation-admin ownership context
- availability uses the same blocking logic as public booking
- MCP does not expose Stripe keys, Checkout sessions, payment intents, or webhook handling
- reservation creation is limited to non-payment flows unless the owner context is acting in an administrative organisation role
Billing-specific input fields:
defaultCurrencyfor billing-safe updates- optional
reservationId/bookingId - optional
paymentStatus - optional
limit
Calendars and Events
primecal_calendars_listprimecal_calendars_getprimecal_calendars_events_listprimecal_calendars_events_search_v2primecal_calendars_events_get_v2primecal_calendars_events_createprimecal_calendars_events_updateprimecal_calendars_events_deleteprimecal_calendar_userGroups_listprimecal_calendar_userGroups_detailsprimecal_calendar_userGroups_createInviteprimecal_calendar_userGroups_acceptInviteprimecal_calendar_userGroups_attachCalendarsprimecal_calendar_userGroups_detachCalendars
Common input fields:
- optional
calendarId(number) - optional
calendarIds(number array) from/to(ISO 8601 UTC timestamps)- optional
fields,limit,cursor,expandRecurrences,includeFullDescription, anduserTimezone eventIdoridfor updates/deleteseventobject for create/update payloads
Recommended references:
- PrimeCal Calendar Events List v2
- PrimeCal Calendar Events Search v2
- PrimeCal Calendar Events Get v2
- MCP Event Listing Best Practices
People-group tool input fields:
groupId(number)groupIds(number array) for optional filtering on listcalendarIds(number array) for attach/detach operationspermission(read,write, oradmin) for attach operationsemailand optionalmessagefor invite creationtokenfor invite acceptance
People-group tools are gated by calendar.userGroups.* action keys. Attach and detach tools require both group scope and calendar scope.
Tasks and Reminders
primecal_tasks_listprimecal_tasks_createprimecal_tasks_updateprimecal_tasks_deleteprimecal_tasks_labels_listprimecal_tasks_labels_createprimecal_tasks_labels_updateprimecal_tasks_labels_deleteprimecal_tasks_focus_listprimecal_tasks_auto_scheduleprimecal_tasks_accept_assignmentprimecal_tasks_bounce_assignmentprimecal_tasks_dependencies_addprimecal_tasks_dependencies_removeprimecal_tasks_checklist_listprimecal_tasks_checklist_addprimecal_tasks_checklist_updateprimecal_tasks_checklist_removeprimecal_reminders_createprimecal_reminders_update
Reminder tools are task-backed and map reminder fields (remindAt, note) into task fields (dueDate, body).
primecal_tasks_create/primecal_tasks_update also accept durationMinutes (1-1440, used by auto-scheduling), context (deep_work, errand, admin, kid_safe, low_energy), autoScheduled, and preferredWindowStartHour/preferredWindowEndHour (0-23) — e.g. "block 30 minutes of deep work to write the report" maps to primecal_tasks_create with durationMinutes: 30, context: 'deep_work'.
primecal_tasks_focus_list accepts an optional date (YYYY-MM-DD, defaults to today UTC) and returns the same schedule-ordered, dependency-filtered list as GET /api/tasks/focus.
primecal_tasks_auto_schedule, primecal_tasks_accept_assignment, and primecal_tasks_bounce_assignment each accept taskId or id; bounce also accepts an optional reason (max 500 chars). primecal_tasks_dependencies_add/_remove take taskId and dependsOnTaskId.
primecal_tasks_checklist_list/_add/_update/_remove all take taskId, plus title (add), or itemId/id with optional title/isDone/order (update), or itemId/id (remove) — e.g. "add 'book venue' to my party-planning task's checklist" maps to primecal_tasks_checklist_add. All four return the task's full updated checklist.
Routines and Household
primecal_routine_templates_listprimecal_routine_templates_cloneprimecal_routine_templates_instantiateprimecal_routine_templates_streakprimecal_routine_templates_skipprimecal_household_items_listprimecal_household_items_createprimecal_household_items_mark_used_upprimecal_household_items_consume
primecal_routine_templates_clone accepts templateId/id and an optional groupId to clone a system template into a people group instead of the caller's personal templates. primecal_routine_templates_instantiate accepts templateId/id and starts the template right now — e.g. "start my evening routine" — the same as the Start now button, independent of the template's recurrence schedule.
primecal_routine_templates_streak accepts templateId/id and returns { currentStreak, longestStreak, lastCompletedDate, totalInstantiations }. primecal_routine_templates_skip accepts templateId/id and skips today's occurrence without creating tasks — e.g. "skip cleaning this week, we're travelling" — without disturbing rotation history.
primecal_household_items_create accepts name, category, quantity, groupId, expiryDate (YYYY-MM-DD), shelfLifeDays (1-3650), and lowStockThreshold (>= 0, an independent count-based restock trigger). primecal_household_items_mark_used_up accepts an item id and flags it so the hourly restock scan raises a task for it. primecal_household_items_consume accepts itemId/id and an optional amount (defaults to 1) to reduce quantity — e.g. "used 2 rolls of paper towels."
See the Routine Templates API and Household Items API for the underlying REST contract and rotation/restock behavior these tools call into.
Automation
primecal_automation_rules_listprimecal_automation_rules_getprimecal_automation_rules_triggerprimecal_automation_rules_audit_list
Common input fields:
ruleId(number)- optional
status,fromDate,toDate - pagination (
page,limit)
Profile and Context
primecal_profile_getprimecal_context_snapshot
Context snapshot input:
days(1-30)tasksLimit(1-200)eventsLimit(1-200)includeCompletedTasks(boolean)
Notifications
primecal_notifications_listprimecal_notifications_mark_readprimecal_notifications_actprimecal_notifications_preferences_getprimecal_notifications_preferences_update
Common input fields:
- optional
unreadOnly,archived(booleans), andthreadId(number) for list filtering - optional
afterCursor(opaque ISO-timestamp cursor) for list pagination ids(number array, 1-100) for marking notifications readnotificationId(number) andactionType(confirm|snooze|delegate|claim|done|undo|ack), plus an optionalpayloadobject (e.g.{ snoozeUntil }or{ snoozeMinutes }for a snooze action) forprimecal_notifications_actpreferences(array of{ eventType, channels, digest?, fallbackOrder?, quietHours? }) for preference updates
All five tools are scoped to the authenticated user's own notifications and preferences; there is no cross-user access. primecal_notifications_list returns at most 50 notifications, newest first. primecal_notifications_act records the 'acted' lifecycle stage via the same NotificationsService.recordAction path as the REST /notifications/:id/act endpoint, and also handles side effects (marking read, archiving on done/confirm, snooze rescheduling, clearing archive state on undo). primecal_notifications_preferences_update replaces the stored preference for each submitted eventType — event types left out of the array are removed, matching the behavior of PUT /api/notifications/preferences.
Resources
primecal.current-context(primecal://current-context)primecal.automation-summary(primecal://automation-summary)primecal.calendar.user-groups(primecal://calendar/user-groups)primecal.calendar.user-group-detail(primecal://calendar/user-groups/{id})
Both resources return application/json textual content in MCP resources/read responses.
People-group resources are read-only and only include groups and calendars allowed by the agent's scope.
Enterprise Reservation JSON-RPC Examples
Switch the active organisation
{
"jsonrpc": "2.0",
"id": 30,
"method": "tools/call",
"params": {
"name": "primecal_organisations_active_set",
"arguments": {
"organisationId": 12
}
}
}
Read availability for one service
{
"jsonrpc": "2.0",
"id": 31,
"method": "tools/call",
"params": {
"name": "primecal_reservations_availability_list",
"arguments": {
"date": "2026-05-20",
"resourceTypeId": 8
}
}
}
Create a non-payment reservation
{
"jsonrpc": "2.0",
"id": 32,
"method": "tools/call",
"params": {
"name": "primecal_reservations_create",
"arguments": {
"resourceTypeId": 8,
"resourceIds": [41, 42],
"startTime": "2026-05-20T10:00:00Z",
"endTime": "2026-05-20T11:00:00Z",
"notes": "Agent-assisted booking"
}
}
}
Read active-organisation billing status
{
"jsonrpc": "2.0",
"id": 33,
"method": "tools/call",
"params": {
"name": "primecal_organisations_billing_status_get",
"arguments": {}
}
}
Update the default billing currency
{
"jsonrpc": "2.0",
"id": 34,
"method": "tools/call",
"params": {
"name": "primecal_organisations_billing_settings_update",
"arguments": {
"defaultCurrency": "eur"
}
}
}
Prepare Stripe onboarding
{
"jsonrpc": "2.0",
"id": 35,
"method": "tools/call",
"params": {
"name": "primecal_organisations_stripe_onboardingLink_create",
"arguments": {}
}
}
Inspect payment-debug state
{
"jsonrpc": "2.0",
"id": 36,
"method": "tools/call",
"params": {
"name": "primecal_organisations_payments_debug_get",
"arguments": {
"paymentStatus": "pending",
"limit": 10
}
}
}
People-Group JSON-RPC Examples
List scoped groups and calendars
{
"jsonrpc": "2.0",
"id": 20,
"method": "tools/call",
"params": {
"name": "primecal_calendar_userGroups_list",
"arguments": {
"includeCalendars": true
}
}
}
Create a group invite
{
"jsonrpc": "2.0",
"id": 21,
"method": "tools/call",
"params": {
"name": "primecal_calendar_userGroups_createInvite",
"arguments": {
"groupId": 9,
"email": "teammate@example.com",
"message": "Join the shared planning calendars."
}
}
}
The result is intentionally generic and does not disclose whether the email maps to an existing PrimeCal user.
Attach a calendar to a group
{
"jsonrpc": "2.0",
"id": 22,
"method": "tools/call",
"params": {
"name": "primecal_calendar_userGroups_attachCalendars",
"arguments": {
"groupId": 9,
"calendarIds": [5],
"permission": "write"
}
}
}
Read the group summary resource
{
"jsonrpc": "2.0",
"id": 23,
"method": "resources/read",
"params": {
"uri": "primecal://calendar/user-groups"
}
}
Schema and Result Model
All tools are listed through MCP tools/list and publish JSON Schema-compatible inputSchema objects.
Result shape follows MCP conventions, with the following important distinctions:
Array-returning tools
Tools that return collections (listOrganisations, listResources, listReservations, primecal_calendars_events_list, etc.) do not set structuredContent. Callers must parse the JSON string in content[0].text to obtain the array.
{
"content": [
{
"type": "text",
"text": "[{\"id\":41,\"name\":\"Pool lane A\"},{\"id\":42,\"name\":\"Pool lane B\"}]"
}
]
}
Object-returning tools
Tools that return a single object set structuredContent to the object directly (not wrapped in another object).
{
"content": [
{
"type": "text",
"text": "{\"id\":42,\"title\":\"Project review\"}"
}
],
"structuredContent": {
"id": 42,
"title": "Project review"
}
}
Error envelope
All errors set isError: true, include a human-readable description in content[0].text, and always set structuredContent to the error object:
{
"isError": true,
"content": [
{
"type": "text",
"text": "Agent does not have access to this tool or scope."
}
],
"structuredContent": {
"error": {
"type": "forbidden",
"message": "Agent does not have access to this tool or scope.",
"statusCode": 403,
"retriable": false
}
}
}
Error type values:
type | HTTP status | Meaning |
|---|---|---|
validation_error | 400 | Malformed input or DTO validation failure. |
unauthorized | 401 | Missing or invalid agent key. |
forbidden | 403 | Valid key but insufficient permission scope. |
not_found | 404 | Requested resource does not exist. |
conflict | 409 | State conflict (e.g. booking overlap). |
rate_limited | 429 | Rate limit exceeded; retry after back-off. |
http_error | 5xx | Upstream or server-side failure. |
internal_error | — | Unexpected internal error. |
retriable is true for transient errors (rate_limited, some http_error variants) and false for permanent failures.
Migration note: previous docs showed
"type": "permission_denied"in the error envelope. This type no longer exists — use"forbidden"(HTTP 403) instead. Callers that matched on"permission_denied"must update to"forbidden".
Payload Richness Expectations
PrimeCal tools should return rich data so AI hosts can reason with minimal extra round trips.
- Event objects include timeline, recurrence, status, color, and metadata.
- People-group objects include role, minimal member summaries, invite-safe metadata, and simplified calendar references when scoped.
- Task objects include labels and task-calendar mirror metadata.
- Automation responses include rule definitions, counters, and audit records.
- Reservation objects include assigned resources, resource type, quote snapshot, customer payload, status, and payment state.
Quick Protocol Smoke Test
initializeagainst/api/mcptools/listresources/listtools/callwithprimecal_profile_getresources/readforprimecal://current-context
May.B.Late demo expectation:
primecal_calendars_listshould includeWork,Personal, andSide projects.primecal_calendar_userGroups_listshould return only groups allowed by the agent's user-group scope.primecal_organisations_listshould return only organisations allowed by the agent profile and underlying owner access.