Repository navigation
fix: preserve complete numeric tool parameters - #1392
Merged
samanhappy merged 2 commits intoOct 27, 2026
Merged
Conversation
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1392 +/- ##
=======================================
Coverage ? 64.24%
=======================================
Files ? 250
Lines ? 20696
Branches ? 5300
=======================================
Hits ? 13297
Misses ? 5746
Partials ? 1653
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Owner
|
Thanks for the fix and the thorough regression coverage! I reviewed the shared conversion logic and both controller call paths, and all 38 related tests passed locally. I found no blocking issues. This neatly fixes numeric-prefix truncation across the OpenAPI and dashboard endpoints. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MCPHub's HTTP tool endpoints parsed numeric strings by prefix. An integer argument of
1e3reached the MCP tool as1,1.5became1, and a number argument of12oopsbecame12.Parse complete, finite decimal strings, including scientific notation, and require integer results for integer schemas. Leave invalid strings unchanged for schema validation. Existing numeric inputs are unchanged. The shared conversion also applies to primitive array items.
The regression exercises real Express HTTP requests for OpenAPI GET/POST and the dashboard tool-call controller, asserting the forwarded arguments. The external MCP catalog and dispatch are mocked; no live model or upstream MCP service is required. This fixes server-side string conversion; client-side pre-conversion is outside this change.
Validation on macOS, Node 24.21.0, pnpm 10.12.4:
test:ci: 2,983 passed, 2 skipped, using the local DNS fixture described below.lint,docs:validate,backend:build,frontend:typecheck,frontend:build, andnode scripts/verify-dist.jspass.The host resolves
example.comandmcp.pcloud.comto blocked benchmarking addresses. The unmodified source reproduces the same 13 unrelated failures. For local validation, a temporary Jest setup supplies public-address DNS fixtures only for these two hosts in the five affected, HTTP-mocked suites, restores DNS afterward, and leaves other hosts and the SSRF guard unchanged. This setup is not committed. Backend/frontend builds were invoked explicitly with Corepack to select the declared pnpm version.Related #1347 adds primitive-array conversion; its scalar numeric parsing is unchanged and this PR fixes that shared parsing.