Repository navigation
fix: enforce MCP tool contracts and effect annotations - #1084
Merged
Merged
Conversation
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.
Wrong-type MCP arguments could reach handlers, and in-process callers could receive a nil error for a failed tool or engine invocation. Enforce the existing input schemas, type string-array items, reject partial skeleton input, preserve errors through the SDK dispatcher, and sort in-process inventories. Successful text results and analytical negative reports retain their behavior.
Audit all 33 default tools and the conditional engine tool with explicit effect annotations. Correct the tool/argument reference, startup/restart behavior and validation limits, including live discovery descriptions for ignored compatibility arguments and the separate expression validator and omitted after_step behavior. This change retains mcp-go v0.54.1; a separate stacked PR will upgrade the existing SDK and test July 2026 compatibility.
Validation at
40ef2b46d9364d11899e77115b762a084d6320e2(normal integration of merged PR1083):855b1300cc7f52540a51c14fe62fc4bb7bb96da58d51717d47d045b43637d691(vcs.modified=false).These are source corrections, not claims about the existing v0.86.2 release, host certification or application runtime acceptance. No installation, deployment, credentials or hosted transport is included. Full CI passed at this exact integration head, including all required Go/build/tidy/UI checks, lint, examples, policy, CodeQL security/quality and the PR OSV scan. At the integration head, full MCP tests, the root standalone package integration test and all four legacy real-CLI protocol revisions pass. Independent integration specification and quality reviews both pass.
The preexisting benchmark listing warning is nonblocking under the owner's explicit instruction; no benchmark or workflow-policy override is included.