Skip to content

fix(mcp-server): filter admin bookings to current user#88

Draft
dhairyashiil wants to merge 2 commits intocalcom:mainfrom
dhairyashiil:fix/mcp-admin-bookings-filter
Draft

fix(mcp-server): filter admin bookings to current user#88
dhairyashiil wants to merge 2 commits intocalcom:mainfrom
dhairyashiil:fix/mcp-admin-bookings-filter

Conversation

@dhairyashiil
Copy link
Copy Markdown
Member

@dhairyashiil dhairyashiil commented May 5, 2026

Summary

  • Filter MCP get_bookings results to bookings where the authenticated user is organizer, host, or attendee.
  • Add a reusable MCP booking participation helper for common bookings response shapes.
  • Update bookings tests to cover the current-user lookup and admin superset filtering.

Test plan

  • bun run test src/tools/bookings.test.ts
  • bun run typecheck
  • bun run lint

Open in Devin Review

@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2026

@dhairyashiil is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@dhairyashiil dhairyashiil enabled auto-merge (squash) May 5, 2026 19:34
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

…view

Default scope is 'mine' (preserves the privacy-by-default filtering this
PR introduces); pass scope='all' to skip the me lookup and return every
booking the API key/token can see. The me + bookings calls in 'mine'
mode now run in parallel via Promise.all.
@sahitya-chandra sahitya-chandra marked this pull request as draft May 5, 2026 20:25
auto-merge was automatically disabled May 5, 2026 20:25

Pull request was converted to draft

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants