[Cal.com] Add AI Extension tools (MCP parity) + EU server support#27992
Conversation
Adds 33 Raycast AI Extension tools that mirror Cal.com's MCP server surface (mcp.cal.com), invokable via `@cal-com-share-meeting-links` in Raycast AI chat. Tools call the existing v2 API client so they reuse the user's API key and automatically respect the new region toggle — no OAuth handshake needed. Adds a Server Region preference (Global default / Europe) so cal.eu accounts work. Fixes raycast#27697. - 33 tool files in src/tools/ (event types, bookings, schedules, availability, busy times, conferencing apps, routing forms, orgs). 16 write-tools export Tool.Confirmation. - ai.instructions guides the model: always look up uids via get-bookings before per-booking actions, IANA timezones only, ISO 8601 with offset, etc. - ai.evals: 5 golden-path tests, all passing. - Dynamic URL routing: userBaseUrl/appBaseUrl/publicBaseUrl exported from src/api/cal.com.ts and used everywhere previously hardcoded. - Bumps @raycast/api to ^1.104.17 and @raycast/utils to ^2.2.4. Removes unused dayjs dep (flagged by greptile on the prior PR).
|
Thank you for your contribution! 🎉 🔔 @eluce2 @peduarte @pernielsentikaer @AlexIsMaking @jfkisafk @runofthemillgeek you might want to have a look. You can use this guide to learn how to check out the Pull Request locally in order to test it. 📋 Quick checkout commandsBRANCH="cal-com-ai-tools-and-eu"
FORK_URL="https://github.com/andrewbenson/raycast-extensions.git"
EXTENSION_NAME="cal-com-share-meeting-links"
REPO_NAME="raycast-extensions"
git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run devWe're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days. |
Greptile SummaryThis PR adds 33 AI Extension tools mirroring Cal.com's MCP server surface and introduces a "Server Region" preference (
Confidence Score: 5/5Safe to merge after fixing the changelog placeholder — all functional changes are well-contained and low-risk. The region-switching logic is a straightforward URL substitution with a safe global default, and the 33 tool files are thin wrappers over the existing, tested CHANGELOG.md — hardcoded date needs to be replaced with Important Files Changed
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
extensions/cal-com-share-meeting-links/CHANGELOG.md:3
The changelog entry uses a hardcoded date (`2026-05-17`) instead of the required `{PR_MERGE_DATE}` placeholder. Per the repository convention, the placeholder is replaced automatically on merge — using a literal date bypasses that process and leaves the timestamp wrong if the PR merges on a different day.
```suggestion
## [AI Tools + EU server support] - {PR_MERGE_DATE}
```
Reviews (3): Last reviewed commit: "Update CHANGELOG.md" | Re-trigger Greptile |
Greptile flagged the inconsistency: this tool used `if (input.skip)` / `if (input.take)` which silently drops `skip: 0` / `take: 0`. The sibling `get-bookings.ts` already uses the correct `!== undefined` guard. Aligned with that pattern.
|
Addressed greptile's finding in |
0xdhrv
left a comment
There was a problem hiding this comment.
Looks good to me, approved ✅
|
Published to the Raycast Store: |
|
🎉 🎉 🎉 We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag. |
Summary
Adds two cohesive changes to the Cal.com extension:
mcp.cal.com), invokable via@cal-com-share-meeting-linksin Raycast AI chat. Tools wrap the existing v2 API client so they reuse the user's API key — no OAuth handshake or separate auth surface.cal.euaccounts no longer hit 401.Why one PR for all this
Both changes share the same
src/api/cal.com.tsaxios client. The AI tools route through that client, so wiring the region toggle there makes EU work for the AI tools automatically — splitting into two PRs would force the second to refactor the first's exports. Happy to split if reviewers prefer.What's in this PR
1. AI Extension tools (33 tools, MCP parity)
Cal.com released an MCP server at
mcp.cal.com(https://cal.com/docs/mcp-server) that wraps their v2 API and exposes 33 tools. This PR exposes those same 33 tools as native Raycast AI Extension tools so users can invoke Cal.com via@cal-com-share-meeting-linksin Raycast AI chat. The implementation calls the existing v2 axios client directly — Cal.com's MCP server is just a v2 wrapper, so bridging to it (with Streamable HTTP + OAuth 2.1) would add ~300 LOC of plumbing for zero capability gain.Tool surface (file-per-tool in
src/tools/):get-me,update-me*get-event-types,get-event-type,create-event-type,update-event-type,delete-event-type*get-bookings,get-booking,create-booking,reschedule-booking,cancel-booking,confirm-booking,mark-booking-absent,get-booking-attendees,add-booking-attendee,get-booking-attendeeget-schedules,get-schedule,get-default-schedule,create-schedule,update-schedule,delete-schedule*get-availability,get-busy-timesget-conferencing-appscalculate-routing-form-slotsget-org-memberships,create-org-membership,get-org-membership,delete-org-membership,get-org-routing-forms,get-org-routing-form-responses(
*= requires a Raycast confirmation dialog before executing. 16 of 33 are write-tools.)ai.instructionscovers the routing rules: always look up booking UIDs viaget-bookingsbefore per-booking actions, never invent UIDs, pass IANA timezones (not abbreviations), pass ISO 8601 with offset (not naive local strings), only call org-* tools if the user is in an org, etc.ai.evals: 5 golden-path tests, all passing (npx ray evals→ 5/5 100%).Out-of-office is intentionally NOT included — it's not part of Cal.com's MCP server surface, so the strict-parity stance keeps it command-only. Easy to add in a follow-up if requested.
2. EU server support — fixes #27697
regiondropdown preference (globaldefault,euopt-in).src/api/cal.com.tsnow derives and exportsuserBaseUrl(api.cal.com / api.cal.eu),appBaseUrl(app.cal.com / app.cal.eu), andpublicBaseUrl(cal.com / cal.eu) from the preference.index.tsx,view-bookings.tsx,view-availability.tsx,out-of-office.tsx,components/schedule-detail.tsx, andnormalizeAvatarUrlswitched to the dynamic exports.Dependency cleanup
@raycast/api^1.104.12 → ^1.104.17 and@raycast/utils^2.2.3 → ^2.2.4 (current as of writing).dayjsfromdependencies(greptile flagged this on the prior PR; the comment was acknowledged but not fixed at the time).Implementation notes
Record<*, *>andunknownaren't supported, and cross-file imported types can't be resolved. For complex objects (locations, metadata, booking-field responses, schedule availability/overrides, routing form responses), tools accept a*Jsonparameter that'sJSON.parsed server-side — keeps the schema extractable while still allowing full v2 API expressiveness. Documented in tool descriptions.number(the helperassertIdinsrc/lib/ai-tools.tscoerces viaString()for URL construction).Tool.Confirmationpayload shape kept minimal (message,image) — matches the in-repo pattern inextensions/superhuman/src/tools/.formatBookingForAIinsrc/lib/ai-tools.tsslims booking responses for AI consumption (drops largebookingFieldsResponsesand nested metadata blobs that burn context for no benefit).Test plan
npm run buildclean across all 38 entry points (5 commands + 33 tool files)npm run lintclean (only the pre-existing "Create out of Office" title-casing warning from PR [Cal.com] Major expansion: availability management, out of office, and View Bookings redesign #27133, deliberately left as-is)npx ray evals→ 5/5 passing (100%)api.cal.eu/app.cal.eu/cal.euwhen the preference is set. Would appreciate a reviewer with a cal.eu account to confirm.Breaking changes
None. Existing users keep their API key and cached state. The default region is
global, which matches the previous hardcoded behavior.Open items