Skip to content

fix(poll): say which argument is wrong, and list each event's filters - #99

Merged
leggetter merged 1 commit into
mainfrom
fix/poll-filter-errors
Nov 5, 2026
Merged

leggetter merged 1 commit into
mainfrom
fix/poll-filter-errors

Conversation

@leggetter

Copy link
Copy Markdown
Collaborator

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_sources now 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

  • Errors: poll_events and wait_for_event include the protocol error's data.detail. For arguments that don't match, data.detail (on events/poll and events/subscribe too) 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 new filters field maps each event name to its arguments, each with a type and description from the event's inputSchema. events is unchanged (a list of names), so the plugin's watch skill and other clients keep working.
  • Descriptions: list_sources, and the poll tools' name and arguments, point at list_sources instead of events/list, which tool-only clients can't call. So do get_event and list_events' unknown-name errors.
  • Docs: the setup skill, the Claude Code guide, the plugin's watch skill, the README's MCP surface, docs/ARCHITECTURE.md and the changelog.

Testing

  • New tests in test/core/catalog.test.ts, test/core/poll.test.ts, test/core/subscriptions.test.ts and test/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, and npx vitest run: 35 files, 429 tests pass.

🤖 Generated with Claude Code

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>
@leggetter
leggetter merged commit 6931ab6 into main Nov 5, 2026
2 checks passed
@leggetter
leggetter deleted the fix/poll-filter-errors branch November 5, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant