Skip to content

fix: Align OAuth MCP annotations with tool behavior - #1238

Merged
sswiftdrtv merged 1 commit into
mainfrom
fix/mcp-oauth-behavior-annotations
Nov 17, 2026
Merged

sswiftdrtv merged 1 commit into
mainfrom
fix/mcp-oauth-behavior-annotations

Conversation

@sswiftdrtv

@sswiftdrtv sswiftdrtv commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Make OAuth MCP annotations describe actual tool behavior rather than defaulting every tool to open-world or inferring destructiveness from a few names.

  • Require explicit read-only, destructive and open-world policy values and propagate Context operation values through full OAuth registration.
  • Fill all required hints on limited OAuth tools and mark profile overwrites as destructive.
  • Correct hidden-effect cases: pack reads can settle expired jobs/refund credits; export changes its timestamp; sends and public uploads have irreversible effects; catalog upserts replace metadata; paid analysis/site work changes credits. Chat compaction only computes an unsaved summary and is read-only.
  • Add side-effect notices and regression coverage using real SDK discovery. All 91 full-mode registered tools, including the app-only sidebar, have explicit boolean hints. Limited business tools are checked individually.
  • Document exact booleans, behavioral reasons and pinned source references for all 91 full-mode and 7 limited-mode registrations in the inventory. Correct stale pack/compaction labels in the existing qualification map.

This changes metadata and descriptions, not handlers, schemas, authorization, scopes or business behavior.

Tests

  • Full repository suite on the final runtime changes: 1,460 files / 9,322 tests passed, 15 files / 45 tests skipped.
  • OAuth suite: 52 files / 313 tests passed, 2 files / 5 tests skipped, after the normal extension build.
  • Final strengthened SDK-discovery and limited-annotation tests: 2 files / 6 tests passed. These were strengthened after the full-suite run, then rerun on this branch.
  • pnpm typecheck:mcp-oauth and final direct OAuth TypeScript check passed.
  • Additional local checks on the exact published tree passed: pnpm exec tsc --noEmit --project tsconfig.build.json, pnpm typecheck:response-contracts, and pnpm typecheck:release-format.
  • pnpm lint:check, changed TypeScript formatting and git diff --check passed.
  • New regressions were observed failing before their fixes. An independent source review found no material annotation issue.

Draft / release limitations

This is ready for code review, not an assertion that the deployed plugin is qualified for approval.

  • The reviewed API baseline is b371f5ed2f2cda150de6156d5a3d6b0c5f7afb21. Database behavior was traced through all relevant migration definitions at ebdb549d0b719a95ee7105bb9146c077841411e6; deployed database state is not verified.
  • Before release, compare authenticated tools/list from the exact intended review endpoint in full and limited OAuth modes against the inventory. Confirm the pack-settlement migration behavior.
  • The separate API-key/Privy standard catalog includes additional tools and is not fully repaired by this patch. If that catalog is submitted, it needs its own audit.
  • No live writes, paid generation, messages, publication, deletion or database mutations were used as test probes. Environment-gated tests remain skipped. No production build/deployment or plugin resubmission was performed.
  • Existing cost/approval/retry limitations remain. Annotation hints are not authorization enforcement. The existing broad search_web preference language and role/message-array research input also deserve a separate submission-metadata/data-minimization review.

Deployment guard

vercel.json disables automatic deployment only for this exact branch, fix/mcp-oauth-behavior-annotations, using Vercel's branch-specific setting. Existing cron settings and every other branch's deployment behavior are unchanged. The exact guard and preservation of all prior config were checked locally. GitHub CI remains enabled. Do not remove the guard, merge, deploy or resubmit without the separate release decision.

Parallel PRs

No existing annotation-repair PR was found before starting publication. Two open PRs touch adjacent code:

Coordinator disposition: this source candidate is superseded by merged #1252, which preserves its history and adds the qualified review/composition fixes. Closing this PR avoids competing source candidates; its branch/history remain preserved. Owning-epic authenticated/native/provider/database and business acceptance remain open as separately recorded; source merge does not close those gates.

Require explicit behavioral hints, cover full and limited catalogs, document classifications, and disable preview deployments for this review branch.
@coderabbitai

coderabbitai Bot commented Nov 9, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@sswiftdrtv
sswiftdrtv merged commit 50cad80 into main Nov 17, 2026
5 checks passed
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.

1 participant