bug(mcp): action-dispatched tools SWALLOW inapplicable params instead of erroring loudly - audit and enforce per-action param validation #127

Closed
opened 2026-07-15 22:51:36 +00:00 by hexajon · 0 comments
hexajon commented 2026-07-15 22:51:36 +00:00 (Migrated from codeberg.org)

Pattern, not an instance: madtea's action-dispatched tools accept one wide input struct per tool, so params that mean nothing to the chosen action are silently ignored. The caller gets a success-shaped result while their intent was dropped on the floor.

Concrete case: #125 - madt_worktrees action=rebase swallowed path= and branch= (the targeting params every sibling action uses) on three differently-shaped calls, and each call quietly operated on the wrong checkout. The swallowing is what made the mis-target invisible.

This is the inverse of the project's own error-rail culture: refusals everywhere else are loud and name the fix, but a syntactically-valid-yet-meaningless param combination sails through.

Asks

  1. Audit every action-dispatched tool (issues, prs, worktrees, actions, labels, milestones, releases, branches, ...): for each action, pin the set of params it actually consumes.
  2. Enforce it: a call carrying a param outside its action's set fails loudly, naming the offending param and the param the action expects (rail style: "rebase does not take path=; the worktree is selected with dir=").
  3. Pin it (internal/parity/ culture): the per-action param matrix lives in a test, so a new action or param can't ship with undeclared/swallowed combinations - extending the matrix is the review checkpoint.
  4. Where a param is genuinely shared-but-optional (owner_repo, raw_json, page/limit), classify it once as global rather than per-action noise.

Acceptance

  • The #125 repro calls fail on the swallowed params alone (independent of the rebase targeting fix).
  • Parity test enforces the per-action param matrix; gate green.
  • Error text follows the rail rules (names the wrong param and the right one; no silent tolerance).

Refs #125, #126.

Pattern, not an instance: madtea's action-dispatched tools accept one wide input struct per tool, so params that mean nothing to the chosen action are silently ignored. The caller gets a success-shaped result while their intent was dropped on the floor. Concrete case: #125 - `madt_worktrees action=rebase` swallowed `path=` and `branch=` (the targeting params every sibling action uses) on three differently-shaped calls, and each call quietly operated on the wrong checkout. The swallowing is what made the mis-target invisible. This is the inverse of the project's own error-rail culture: refusals everywhere else are loud and name the fix, but a syntactically-valid-yet-meaningless param combination sails through. ## Asks 1. **Audit every action-dispatched tool** (issues, prs, worktrees, actions, labels, milestones, releases, branches, ...): for each action, pin the set of params it actually consumes. 2. **Enforce it**: a call carrying a param outside its action's set fails loudly, naming the offending param and the param the action expects (rail style: "rebase does not take path=; the worktree is selected with dir="). 3. **Pin it** (internal/parity/ culture): the per-action param matrix lives in a test, so a new action or param can't ship with undeclared/swallowed combinations - extending the matrix is the review checkpoint. 4. Where a param is genuinely shared-but-optional (owner_repo, raw_json, page/limit), classify it once as global rather than per-action noise. ## Acceptance - The #125 repro calls fail on the swallowed params alone (independent of the rebase targeting fix). - Parity test enforces the per-action param matrix; gate green. - Error text follows the rail rules (names the wrong param and the right one; no silent tolerance). Refs #125, #126.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sixfold-space/madtea#127
No description provided.