Skip to content

[mcp] fix: isolate tools list metadata - #271

Merged
Wangmerlyn merged 1 commit into
mainfrom
codex/mcp-tools-list-copy
Jul 1, 2026
Merged

[mcp] fix: isolate tools list metadata#271
Wangmerlyn merged 1 commit into
mainfrom
codex/mcp-tools-list-copy

Conversation

@Wangmerlyn

Copy link
Copy Markdown
Owner

Summary

  • return a deep defensive copy from MCP tools/list so local callers cannot mutate the shared tool registry
  • add a regression test covering top-level and nested schema mutation plus later tools/call dispatch
  • document the snapshot contract in AGENTS.md and the MCP guide

Verification

  • PYTHONPATH=src pytest tests/mcp/test_server.py -k mcp_tools_list_returns_snapshot_not_mutable_registry -q
  • PYTHONPATH=src pytest tests/mcp/test_server.py -q
  • mkdocs build --strict
  • pre-commit run --all-files --show-diff-on-failure
  • PYTHONPATH=src pytest tests -q

README note: Zenodo DOI badge remains present at README.md:5.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@Wangmerlyn, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 15 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9ed9b306-650e-42d0-97cb-c5d98e5f79e2

📥 Commits

Reviewing files that changed from the base of the PR and between b277a4a and c0b710c.

📒 Files selected for processing (4)
  • AGENTS.md
  • docs/guides/mcp.md
  • src/keep_gpu/mcp/server.py
  • tests/mcp/test_server.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/mcp-tools-list-copy

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

Comment @coderabbitai help to get the list of available commands.

@Wangmerlyn
Wangmerlyn merged commit 1adedf8 into main Jul 1, 2026
6 checks passed
@Wangmerlyn
Wangmerlyn deleted the codex/mcp-tools-list-copy branch July 1, 2026 23:50
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