Repository navigation
feat(mcp): add opt-in reference number tools - #510
Merged
Merged
Conversation
add_reference_numbers (tier A) and remove_reference_numbers (tier C) in a new opt-in reference_numbers toolset, ported from #452 onto the write kit that landed in #506-#509. Drops the set_party_role party_id hint from the server instructions: it repeats the tool's own description, and with every toolset served the instructions otherwise exceed Claude Code's 2 KB limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Shadow risk calibration
Calibration result: agreement. Shadow risk never blocks or enables merge. Keep it in observation mode until roughly 50 pull requests have human-reviewed labels, then calibrate before considering any policy use. |
This comment has been minimized.
This comment has been minimized.
alosec
added a commit
that referenced
this pull request
Nov 6, 2026
…e map Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
alosec
added a commit
that referenced
this pull request
Nov 6, 2026
alosec
marked this pull request as ready for review
November 6, 2026 22:18
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Akshay's #452 added tools to add and remove reference numbers (PO and job numbers) on containers, shipments and tracking requests. Its write plumbing landed through the #506–#509 split, but the two reference-number tools never reached
main. This PR carries just those tools onto the write kit that is now onmain, so #452 can be closed. (DEV-14373)What changes
reference_numbers. It is not in the default toolsets, so the hosted server serves the same 30 tools untilT49_MCP_TOOLSETSlists it.add_reference_numbers(tier A) reads the list, sends the union and reads it back. A repeated call changes nothing.remove_reference_numbers(tier C) needs the user's approval of a preview. The token covers the whole list, so any change after the preview returnsstale_preview.concurrent_change_detectedwhen the list read back differs from the one sent. Terminal49 replaces the whole list and has no conditional update, so the tool descriptions state that a number added by someone else between the read and the write is lost.set_party_roleparty_id hint. It repeats that tool's own description, and with every toolset on, the instructions otherwise run 71 bytes past Claude Code's 2 KB limit. This is the only change to default sessions besidesreference_numbersappearing inwhoami's toolset enum.docs/mcp/home.mdxlist the new toolset and count 35 tools.The tool files and tests come from #452 unchanged. Wiring, docs and the instructions trim are new.
Testing
npx vp test runinpackages/mcp: 70 files, 1038 tests pass. This includes feat(mcp): add reference number tools #452's unit tests and its transport test, which adds and then removes a number over the MCP client.tsc --noEmit, lint (0 errors) and the format check are clean.api-git-staging, this branch merged intostaging,reference_numbersenabled for Preview/staging only), against a demo shipment. A staging API read after each step checked the result:["QA-REF-1106"]on the record. Claude reported it correctly.[]. The test data is gone.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.

Confidence Score: 5/5
The PR appears safe to merge, with the new tools remaining opt-in.Summary
Adds two tools in the opt-in
reference_numberstoolset:The default selection remains at 30 tools. The PR adds unit and transport tests, updates the docs and feature map, and trims a server instruction.
No actionable issues were found. alosec acknowledges the read/PATCH race and raw JSON approval form in the PR description. Tests were not run during this review.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Reference number call] --> B[Read current list] B --> C{Add or remove?} C -->|Add| D[Build union] C -->|Remove| E[Show current and proposed lists] E --> F[User approves] F --> G[Read again and check approval] G -->|List changed| E G -->|Approval matches| H[Write proposed list] D --> H H --> I[Read back and report result]Reviews (1) · Last reviewed commit: "chore(mcp): list the reference number to..." · Reviewed by Greptile