Calendar Scheduling & Booking
14 tools (Layers 0, 2–4) for contact resolution, calendar discovery, event querying, free slot finding, availability checking, RRULE expansion, atomic booking, Open Scheduling, and proposal composition. 12 read-only tools + 2 write tools (book_slot, request_booking).
Source & Provenance
Runtime
These tools run inside the Temporal Cortex MCP server (@temporal-cortex/cortex-mcp), a compiled Rust binary distributed as an npm package.
Install and startup lifecycle:
- 1.
npx resolves @temporal-cortex/cortex-mcp from the npm registry (one-time, cached locally after first download) - The postinstall script downloads the platform-specific binary from the GitHub Release and verifies its SHA256 checksum against the embedded
checksums.json — installation halts on mismatch - The MCP server starts as a local process communicating over stdio (no listening ports)
- Calendar tools make authenticated API calls to your configured providers (Google Calendar API, Microsoft Graph API, CalDAV endpoints)
Credential storage: OAuth tokens are stored locally at ~/.config/temporal-cortex/credentials.json and read exclusively by the local MCP server process. No credential data is transmitted to Temporal Cortex servers. The binary's filesystem access is limited to ~/.config/temporal-cortex/ — verifiable by inspecting the open-source Rust code or running under Docker where the mount is the only writable path.
File access: The binary reads and writes only ~/.config/temporal-cortex/ (credentials and config). No other filesystem writes.
Network scope: Calendar tools connect only to your configured providers (googleapis.com, graph.microsoft.com, or your CalDAV server). In Local Mode (default), no calls to Temporal Cortex servers and no telemetry is collected. In Platform Mode, three tools (resolve_identity, query_public_availability, request_booking) call api.temporal-cortex.com for cross-user scheduling — no credential data is included in these calls.
Pre-run verification (recommended before first use):
- 1. Inspect the npm package without executing: INLINECODE15
- Verify checksums independently against the GitHub Release (see verification pipeline below)
- For full containment, run in Docker instead of npx (see Docker containment below)
Verification pipeline: Checksums are published independently at each GitHub Release as SHA256SUMS.txt — verify the binary before first use:
CODEBLOCK0
As defense-in-depth, the npm package also embeds checksums.json and the postinstall script compares SHA256 hashes during install — installation halts on mismatch (the binary is deleted, not executed). This automated check supplements, but does not replace, independent verification above.
Build provenance: Binaries are cross-compiled from auditable Rust source in GitHub Actions across 5 platforms (darwin-arm64, darwin-x64, linux-x64, linux-arm64, win32-x64). Source: github.com/temporal-cortex/mcp (MIT-licensed). The CI workflow, build artifacts, and release checksums are all publicly inspectable.
Docker containment (no Node.js on host, credential isolation via volume mount):
CODEBLOCK1
Build: INLINECODE18
Tools
Layer 0 — Discovery
| Tool | When to Use |
|---|
| INLINECODE19 | DNS for Human Time: resolve an email, phone, or agent ID to a Temporal Cortex slug. Call before query_public_availability. Platform Mode only. |
| INLINECODE21 |
Search the user's address book by name (Google People API, Microsoft Graph). Returns matching contacts with emails, phones, organization, and job title. Opt-in — requires contacts permission. |
|
resolve_contact | Given a confirmed contact's email, determine the best scheduling path: Open Scheduling (instant booking), email, or phone. Chains with
resolve_identity when Platform API is available. |
Layer 2 — Calendar Operations
| Tool | When to Use |
|---|
| INLINECODE24 | First call when calendars are unknown. Returns all connected calendars with provider-prefixed IDs, names, labels, primary status, and access roles. |
| INLINECODE25 |
List events in a time range. TOON format by default (~40% fewer tokens than JSON). Use provider-prefixed IDs for multi-calendar:
"google/primary",
"outlook/work". |
|
find_free_slots | Find available gaps in a calendar. Set
min_duration_minutes for minimum slot length. |
|
expand_rrule | Expand recurrence rules (RFC 5545) into concrete instances. Handles DST, BYSETPOS, EXDATE, leap years. Use
dtstart as local datetime (no timezone suffix). |
|
check_availability | Check if a specific time slot is free. Checks both events and active booking locks. |
Layer 3 — Availability
| Tool | When to Use |
|---|
| INLINECODE33 | Merged free/busy view across multiple calendars. Pass calendar_ids array. Privacy: "opaque" (default, hides sources) or "full". |
| INLINECODE37 |
Check another user's public availability by Temporal Link slug. Pass the slug and date to find their open time slots. Platform Mode only. |
Layer 4 — Booking
| Tool | When to Use |
|---|
| INLINECODE38 | Book a time slot atomically. Lock → verify → write → release. Always check_availability first. |
| INLINECODE40 |
Book on another user's public calendar by Temporal Link slug. Requires Platform Mode. |
|
compose_proposal | Compose a scheduling proposal message for email, Slack, or SMS. Formats proposed times in the recipient's timezone with an optional Temporal Link self-serve booking URL. Does NOT send — returns formatted text for the agent to send via its channel MCP. |
Critical Rules
- 1. Discover calendars first — call
list_calendars when you don't know which calendars are connected. Use the returned provider-prefixed IDs for all subsequent calls. - Use provider-prefixed IDs for multi-calendar setups:
"google/primary", "outlook/work", "caldav/personal". Bare IDs (e.g., "primary") route to the default provider. - TOON is the default format — output uses TOON (~40% fewer tokens than JSON). Pass
format: "json" only if you need structured parsing. - Check before booking — always call
check_availability before book_slot. Never skip the conflict check. - Content safety — event summaries and descriptions pass through a sanitization firewall before reaching the calendar API.
- Timezone awareness — all tools accept RFC 3339 with timezone offsets. Never use bare dates.
- Confirm before booking — when running autonomously, always present booking details (time, calendar, summary) to the user and wait for confirmation before calling
book_slot or request_booking. - Confirm contact selection — when
search_contacts returns multiple matches, present candidates to the user and confirm which contact is correct. Never auto-select. - Confirm before sending proposals — when using
compose_proposal, present the composed message to the user before sending. Never auto-send outreach. - Contact search is optional — if contacts permission is not configured, ask the user for the email directly. The workflow works without contact search.
Full Booking Workflow
CODEBLOCK2
If the slot is busy at step 5, use find_free_slots to suggest alternatives.
Open Scheduling Workflow (Platform Mode)
CODEBLOCK3
Two-Phase Commit Protocol
CODEBLOCK4
If any step fails, the lock is released and the booking is aborted. No partial writes.
Common Patterns
Schedule with a Contact (End-to-End)
CODEBLOCK5
List Events This Week
CODEBLOCK6
Find Free Time Across Calendars
CODEBLOCK7
Check and Book a Slot
CODEBLOCK8
Expand Recurring Events
CODEBLOCK9
Provider-Prefixed Calendar IDs
All calendar IDs use provider-prefixed format:
| Format | Example | Routes to |
|---|
| INLINECODE55 | INLINECODE56 | Google Calendar |
| INLINECODE57 |
"outlook/work" | Microsoft Outlook |
|
caldav/<id> |
"caldav/personal" | CalDAV (iCloud, Fastmail) |
|
<id> (bare) |
"primary" | Default provider |
Privacy Modes
| Mode | INLINECODE63 | Use case |
|---|
| INLINECODE64 (default) | Always INLINECODE65 | Sharing availability externally |
| INLINECODE66 |
Actual count | Internal use — shows which calendars are busy |
Tool Annotations (book_slot)
| Property | Value | Meaning |
|---|
| INLINECODE68 | INLINECODE69 | Creates calendar events |
| INLINECODE70 |
false | Never deletes or overwrites existing events |
|
idempotentHint |
false | Calling twice creates two events |
|
openWorldHint |
true | Makes external API calls |
Tool Annotations (request_booking)
| Property | Value | Meaning |
|---|
| INLINECODE77 | INLINECODE78 | Creates calendar events on another user's calendar |
| INLINECODE79 |
false | Never deletes or overwrites existing events |
|
idempotentHint |
false | Calling twice creates two bookings |
|
openWorldHint |
true | Calls the Platform API |
Tool Annotations (compose_proposal)
| Property | Value | Meaning |
|---|
| INLINECODE86 | INLINECODE87 | Pure formatting — no state modification |
| INLINECODE88 |
false | Never deletes data |
|
idempotentHint |
true | Same input always gives same output |
|
openWorldHint |
false | No external calls — pure computation |
Tool Annotations (search_contacts)
| Property | Value | Meaning |
|---|
| INLINECODE95 | INLINECODE96 | Reads contacts only — no modifications |
| INLINECODE97 |
false | Never deletes contacts |
|
idempotentHint |
true | Same query always gives same results |
|
openWorldHint |
true | Calls external contact API (Google People / Microsoft Graph) |
Error Handling
| Error | Action |
|---|
| "No credentials found" | Run: npx @temporal-cortex/cortex-mcp auth google (or outlook / caldav). |
| "Timezone not configured" |
Prompt for IANA timezone. Or run the auth command which configures timezone. |
| Slot is busy / conflict detected | Use
find_free_slots to suggest alternatives. Present options to user. |
| Lock acquisition failed | Another agent is booking the same slot. Wait briefly and retry, or suggest alternative times. |
| Content rejected by sanitization | Rephrase the event summary/description. The firewall blocks prompt injection attempts. |
Open Scheduling & Temporal Links
When a user has Open Scheduling enabled, their Temporal Link (book.temporal-cortex.com/{slug}) allows anyone to:
- 1. Query availability — INLINECODE108
- Book a meeting —
POST /public/{slug}/book with INLINECODE110 - Discover via Agent Card — INLINECODE111
Workflow: Book via Temporal Link
- 1. User shares their Temporal Link
- Agent calls availability endpoint to find free slots
- Agent calls booking endpoint with selected slot
- Meeting is created on the user's default calendar
See Temporal Links Reference for detailed API documentation.
Additional References
- - Calendar Tools Reference — Complete input/output schemas for all 14 tools
- Multi-Calendar Guide — Provider routing, labels, privacy modes, cross-provider operations
- RRULE Guide — Recurrence rule patterns, DST edge cases, 5 LLM failure modes
- Booking Safety — 2PC details, concurrent booking, lock TTL, content sanitization
- Temporal Links — Open Scheduling endpoints, Agent Card integration, calendar routing
- Open Scheduling Guide — Identity resolution, public availability, external booking via MCP tools
日历调度与预订
14个工具(第0层、第2-4层),用于联系人解析、日历发现、事件查询、空闲时段查找、可用性检查、RRULE展开、原子预订、开放调度和提案撰写。12个只读工具 + 2个写入工具(bookslot、requestbooking)。
来源与出处
运行时
这些工具在Temporal Cortex MCP服务器(@temporal-cortex/cortex-mcp)内运行,这是一个编译后的Rust二进制文件,以npm包形式分发。
安装和启动生命周期:
- 1. npx从npm注册表解析@temporal-cortex/cortex-mcp(一次性,首次下载后本地缓存)
- postinstall脚本从GitHub Release下载平台特定二进制文件,并对照嵌入的checksums.json验证其SHA256校验和——校验和不匹配则安装停止
- MCP服务器作为本地进程启动,通过stdio通信(无监听端口)
- 日历工具向您配置的提供商(Google Calendar API、Microsoft Graph API、CalDAV端点)发出经过身份验证的API调用
凭据存储: OAuth令牌本地存储在~/.config/temporal-cortex/credentials.json,仅由本地MCP服务器进程读取。没有凭据数据传输到Temporal Cortex服务器。二进制文件的文件系统访问限于~/.config/temporal-cortex/——可通过检查开源Rust代码或在Docker下运行(挂载点是唯一可写路径)来验证。
文件访问: 二进制文件仅读写~/.config/temporal-cortex/(凭据和配置)。无其他文件系统写入。
网络范围: 日历工具仅连接到您配置的提供商(googleapis.com、graph.microsoft.com或您的CalDAV服务器)。在本地模式(默认)下,不调用Temporal Cortex服务器,也不收集遥测数据。在平台模式下,三个工具(resolveidentity、querypublicavailability、requestbooking)调用api.temporal-cortex.com进行跨用户调度——这些调用中不包含凭据数据。
运行前验证(建议首次使用前执行):
- 1. 在不执行的情况下检查npm包:npm pack @temporal-cortex/cortex-mcp --dry-run
- 对照GitHub Release独立验证校验和(见下方验证流程)
- 为完全隔离,在Docker中运行而非npx(见下方Docker隔离)
验证流程: 校验和在每个GitHub Release中作为SHA256SUMS.txt独立发布——在首次使用前验证二进制文件:
bash
1. 从GitHub获取校验和(独立于npm包)
curl -sL https://github.com/temporal-cortex/mcp/releases/download/mcp-v0.9.1/SHA256SUMS.txt
2. 与npm安装的二进制文件进行比较
shasum -a 256 $(npm root -g)/@temporal-cortex/cortex-mcp/bin/cortex-mcp
作为深度防御,npm包还嵌入了checksums.json,postinstall脚本在安装期间比较SHA256哈希——校验和不匹配则安装停止(二进制文件被删除,不执行)。此自动检查补充但不替代上述独立验证。
构建出处: 二进制文件从可审计的Rust源代码在GitHub Actions中跨5个平台交叉编译(darwin-arm64、darwin-x64、linux-x64、linux-arm64、win32-x64)。源代码:github.com/temporal-cortex/mcp(MIT许可)。CI工作流、构建产物和发布校验和均可公开检查。
Docker隔离(主机上无需Node.js,通过卷挂载实现凭据隔离):
json
{
mcpServers: {
temporal-cortex: {
command: docker,
args: [run, --rm, -i, -v, ~/.config/temporal-cortex:/root/.config/temporal-cortex, cortex-mcp]
}
}
}
构建:docker build -t cortex-mcp https://github.com/temporal-cortex/mcp.git
工具
第0层——发现
| 工具 | 使用时机 |
|---|
| resolveidentity | 人类时间的DNS:将电子邮件、电话或代理ID解析为Temporal Cortex slug。在querypublicavailability之前调用。仅限平台模式。 |
| searchcontacts |
按名称搜索用户的通讯录(Google People API、Microsoft Graph)。返回匹配的联系人及其电子邮件、电话、组织和职位。选择加入——需要联系人权限。 |
| resolve
contact | 给定已确认联系人的电子邮件,确定最佳调度路径:开放调度(即时预订)、电子邮件或电话。当平台API可用时,与resolveidentity链接。 |
第2层——日历操作
| 工具 | 使用时机 |
|---|
| listcalendars | 当日历未知时首先调用。返回所有已连接的日历,包含提供商前缀ID、名称、标签、主要状态和访问角色。 |
| listevents |
列出时间范围内的事件。默认使用TOON格式(比JSON少约40%的令牌)。对多日历使用提供商前缀ID:google/primary、outlook/work。 |
| find
freeslots | 查找日历中的可用间隙。设置min
durationminutes以指定最小时段长度。 |
| expand_rrule | 将重复规则(RFC 5545)展开为具体实例。处理夏令时、BYSETPOS、EXDATE、闰年。使用dtstart作为本地日期时间(无时区后缀)。 |
| check_availability | 检查特定时间段是否空闲。同时检查事件和活动预订锁定。 |
第3层——可用性
| 工具 | 使用时机 |
|---|
| getavailability | 跨多个日历的合并空闲/忙碌视图。传递calendarids数组。隐私:opaque(默认,隐藏来源)或full。 |
| querypublicavailability |
通过Temporal Link slug检查其他用户的公开可用性。传递slug和日期以查找其空闲时间段。仅限平台模式。 |
第4层——预订
| 工具 | 使用时机 |
|---|
| bookslot | 原子性地预订时间段。锁定→验证→写入→释放。始终先调用checkavailability。 |
| request_booking |
通过Temporal Link slug在其他用户的公开日历上预订。需要平台模式。 |
| compose_proposal | 为电子邮件、Slack或短信撰写调度建议消息。在收件人的时区中格式化建议时间,并附带可选的Temporal Link自助预订URL。不发送——返回格式化文本,供代理通过其通道MCP发送。 |
关键规则
- 1. 首先发现日历——当您不知道哪些日历已连接时,调用listcalendars。对所有后续调用使用返回的提供商前缀ID。
- 对多日历设置使用提供商前缀ID:google/primary、outlook/work、caldav/personal。裸ID(例如primary)路由到默认提供商。
- TOON是默认格式——输出使用TOON(比JSON少约40%的令牌)。仅在需要结构化解析时传递format: json。
- 预订前检查——始终在bookslot之前调用check_availability。切勿跳过冲突检查。
- 内容安全——事件摘要和描述在到达日历API之前通过清理防火墙。
- 时区感知——所有工具接受带时区偏移的RFC 3339。切勿使用裸日期。
7.