Repository navigation
fix(mcp): make every tool's hints match what it does - #54
Merged
Merged
Conversation
OpenAI's plugin review rejected FTW because tool annotations did not match behaviour. Four kinds of error: - setup_edit, setup_reset, setup_validate, setup_test and setup_connect overwrite or discard the draft or its credentials but said destructiveHint false. - goal_request and car_goal_request replace a setting or schedule once the owner approves, and car_goal_request can clear it, but said destructiveHint false. - openWorldHint was false for every tool. setup_discover scans the home network, setup_test reaches an address the user typed into the draft, and setup_connect signs in at a vendor. They now say true. - setup_discover only reads (Core fails it if the draft changed) but said readOnlyHint false. hints_test.go pins all three hints for all 29 tools in both protocol families, and fails for a tool with no row. docs/public-plugin.md gives the reason for each hint and lists the 27 public tools the profile serves. internal/mcp grows by 14 lines of Go without tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Problem
OpenAI's plugin review rejected FTW: "One or more of your tool's annotations do not appear to match the tool's behavior." The listing set all hints as booleans, but several values were wrong.
Change
setup_edit,setup_reset,setup_validate,setup_test,setup_connectgoal_request,car_goal_requestclearremoves the car's schedule.setup_discover,setup_test,setup_connectsetup_discoverEvery other tool keeps its hints.
setup_beginstays read-only. Its description now says that the tool only reads, and that the client may first ask the owner for the setup grant.openWorldis a new field ontool. The setup tools derive their hints: every setup write is destructive, and the three preparations are open world.hints_test.gowrites out all three hints for all 29 tools, checks both protocol families, and fails for a tool with no row. It replacesTestChargeNowIsMarkedDestructive.docs/public-plugin.mdgives the reason for each hint. Its tool list also had only 14 of the 27 public tools; it now lists all of them.internal/mcpgrows by 14 lines of Go without tests.Evidence
Run locally on this branch:
go vet ./...,go test -race -count=1 ./...,go test -count=1 -tags ftwclouddev ./...andbash scripts/check-imports.shall pass.TestToolHintsMatchTheTablefail on all seven, as it should.I checked the behaviour behind each hint against Core at
srcfl/ftwmaster:handleSetupPrepare: discovery changes no draft; the test may rotate a draft token.refresh_tokeninto the draft.ValidateWithChecksaves the normalized draft.RestartWithCheckdiscards it.🤖 Generated with Claude Code