scope the unknown-argument valid-argument list to the called action #756
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea#756
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When a call to an action-dispatched tool carries an unknown argument, the rejection lists every argument the tool accepts across all its actions. For madt_repos that is about seventy names, most irrelevant to the action that was called.
Example:
madt_repos action=search query=madtearejectsqueryand then lists the full madt_repos argument set (create, merge, mirror, and the rest), not the handful thatsearchuses (q,limit,page,sort,order).What
formatUnknownArgs in internal/mcp/arg_suggest.go renders the valid-argument list from the tool's whole recorded field set. For a consolidated, action-dispatched tool (ADR 0015) the useful set is the arguments valid for the action in the call.
Fix
Scope the valid-argument list to the called action's arguments when the call names an action on an action-dispatched tool. Fall back to the full set when there is no action. Keep the did-you-mean suggestion logic and its bounds unchanged (ADR 0005): this narrows only the fallback list, it does not loosen the matcher.
Acceptance
action=searchlists only the arguments valid forsearch.