per-server annotation overrides for misbehaving upstreams - #1323
Open
DScoNOIZ wants to merge 12 commits into
Hidden character warning
The head ref may contain hidden characters: "\ud83d\ude80-FEAT-ANNOTATION-OVERRIDES-\ud83d\udee1\ufe0f-PER-SERVER-TOOL-EXCEPTIONS-\u2728"
Open
DScoNOIZ wants to merge 12 commits into
DScoNOIZ wants to merge 12 commits into
Conversation
added 12 commits
September 19, 2026 23:25
…G + OAUTH GUARD 🔒
…T + DISPATCH FRESH 🔒
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
This branch has not been 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.
Hi, ran into this with a couple of old mcp servers, browseros in my case. They dont send any annotations at all, so all their tools fall into destructive tier by default. Readonly agents cant even see plain readers like navigate or snapshot, even though theres nothing dangerous in them. Patching every upstream by hand is obviously not an option, so I made operator side overrides.
How it works, theres a new optional map annotation_overrides in the server config. Key is the tool name or a star for all of them at once, value is annotations. Merges per hint on top of what the server sent, priority is straightforward, exact then wildcard then upstream. Whatever is not set is inherited. You can delete with null by key, same as everywhere else in the config. Only admin can change it, both rest and mcp. No restart needed, applies right away on the next get. Written to audit as config_change. Left the tool approval hash alone, its got no business there.
On the ui side I put a card into the server configuration right after trust mode. Theres a compact table plus a mark safe button per tool, it just presets readonly true destructive false and thats it. It never touches openWorldHint by itself, thats manual only if youre really sure. Left the selects three state inherit true false, cause a toggle just cant express inherit.
Compat wise all quiet. Field is omitempty everywhere, old configs load like they used to, without overrides behavior is exactly like before. Covered merge priority validation and admin only with tests. Docs added in config-file and upstream-servers, swagger regenerated.
Tested live on browseros, 24 tools there and 5 with no annotations at all. Readonly token used to see zero browseros tools, after the override navigate is found and called through the read door. Deleted the override and everything flipped right back. If something doesnt fit or needs splitting up, let me know, will rework.