Skip to content

fix(core): add 'number' schema type mapping to fix float parameter loading#667

Open
anubhav756 wants to merge 1 commit into
mainfrom
anubhav-number
Open

fix(core): add 'number' schema type mapping to fix float parameter loading#667
anubhav756 wants to merge 1 commit into
mainfrom
anubhav-number

Conversation

@anubhav756
Copy link
Copy Markdown
Contributor

@anubhav756 anubhav756 commented May 22, 2026

Description

This PR adds support for the standard JSON Schema "number" type.

Context

Following the server's correction to emit standard "type": "number" for floating-point parameters in MCP manifests, the client failed to load any tools containing float parameters.

Changes

  • Maps the standard "number" type to Python's built-in float type.
  • Retains the "float" mapping for backward compatibility with any legacy tool configs.
  • Adds a comprehensive replication unit test.

Checklist

  • Make sure to open an issue as a bug/issue before writing your code!
  • Ensure the tests and linter pass
  • Code coverage does not decrease
  • Appropriate docs were updated (N/A - Docs are already correct)
  • Make sure to add ! if this involves a breaking change (N/A - Backward-compatible fix)

Issue Reference

Fixes #649 🦕

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"number" schema type rejected by client, breaking float params from MCP server. (regression of #14)

1 participant