Skip to content

fix(plugin): reject invalid tool arguments - #46238

Open
fancive wants to merge 2 commits into
anomalyco:devfrom
fancive:tool-args-error
Open

fix(plugin): reject invalid tool arguments#46238
fancive wants to merge 2 commits into
anomalyco:devfrom
fancive:tool-args-error

Conversation

@fancive

@fancive fancive commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #45532

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Rejects custom tool argument definitions that are not Zod schemas. The error identifies the invalid argument instead of allowing it to be silently reduced to an empty schema.

How did you verify your code works?

  • Added tests for invalid plain-object arguments and valid Zod arguments
  • Ran bun test test/tool.test.ts from packages/plugin
  • Ran changed-scope oxlint
  • Ran the repository typecheck across 30 packages

Screenshots / recordings

Not applicable; this change has no UI.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added contributor needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Aug 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

custom tool with plain-object args silently fails to register

1 participant