Repository navigation
fix(mcp): reject unknown tool arguments instead of ignoring them - #3787
Conversation
|
@Aryainguz is attempting to deploy a commit to the HyperDX Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: 2202b94 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
PR Review✅ No issues found. |
|
No description provided. |
|
No description provided. |
1 similar comment
|
No description provided. |
Deep Review✅ No critical issues found. The change is small and well-targeted: 🟡 P2 -- recommended
🔵 P3 nitpicks (4)
Reviewers (7): correctness, testing, maintainability, project-standards, api-contract, kieran-typescript, reliability. Testing gaps:
No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond |
brandon-pereira
left a comment
There was a problem hiding this comment.
LGTM - thanks for the contribution! ❤️
Summary
Fixes #3543
MCP tools dropped arguments they didn't know without an error.
clickstack_timeserieswithhaving: "count > 5", or a typo likelimt: 10, ran without it, so an agent got unfiltered results and couldn't tell. The schemas we send to clients already sayadditionalProperties: false; the server just didn't enforce it.createRegisterToolnow registers every tool's input schema with.strict(), so an unknown top-level argument returns an error naming it. Top-level keys only, as discussed on the issue.clickstack_timeseries+havingUnrecognized key(s) in object: 'having'havingonclickstack_table(a real option)tools/listsent to clientsHow to reproduce
Starting point:
packages/api, no services needed.On
main:src/mcp/__tests__/toolSchemas.test.tsand runyarn ci:unit src/mcp/__tests__/toolSchemas.test.ts.notARealOption.On this branch:
clickstack_timeserieswithhavingreturnsUnrecognized key(s) in object: 'having'.References