Repository navigation
fix(poll): say which argument is wrong, and list each event's filters - #99
Merged
Merged
Conversation
Clients with tools only (Claude Code without the plugin, Codex, Cursor) can't call events/list, so they couldn't find an event's filters, and when they guessed wrong, poll_events and wait_for_event returned only "arguments do not match the inputSchema", dropping data.detail. - The poll tools' errors include data.detail. For arguments that don't match, it names the unknown or wrong argument and lists the event's arguments, for events/poll and events/subscribe too. - list_sources adds filters: each event's arguments, with type and description, from its inputSchema. events stays a list of names. - The tool descriptions, and get_event and list_events' unknown-name errors, point at list_sources instead of events/list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Tool-only clients (Claude Code without the plugin, Codex, Cursor) couldn't find an event's filters, and when they guessed wrong the poll tools said only "arguments do not match the inputSchema".
list_sourcesnow lists each event's filters, and the tool error names the bad argument and the ones the event takes:arguments do not match the inputSchema: unknown argument "action". github.issues takes repository (string), actions (string[]), sender (string)Changes and testing
Changes
poll_eventsandwait_for_eventinclude the protocol error'sdata.detail. For arguments that don't match,data.detail(onevents/pollandevents/subscribetoo) names the unknown or wrong field and lists the event's arguments, instead of zod's raw JSON. Unknown keys were already refused (every source's arguments are strict).list_sources: a newfiltersfield maps each event name to its arguments, each with a type and description from the event's inputSchema.eventsis unchanged (a list of names), so the plugin'swatchskill and other clients keep working.list_sources, and the poll tools'nameandarguments, point atlist_sourcesinstead ofevents/list, which tool-only clients can't call. So doget_eventandlist_events' unknown-name errors.watchskill, the README's MCP surface,docs/ARCHITECTURE.mdand the changelog.Testing
test/core/catalog.test.ts,test/core/poll.test.ts,test/core/subscriptions.test.tsandtest/host/bridge.test.ts, which drives the tools over MCP against a fake Event Gateway. 8 fail without the fix: the poll tool test gets exactly "arguments do not match the inputSchema".npx tsc --noEmit, andnpx vitest run: 35 files, 429 tests pass.🤖 Generated with Claude Code