Skip to content

Conversation

ln-12
Copy link

@ln-12 ln-12 commented Aug 28, 2025

This pull request updates the number handling for empty text fields. Fixes #623.

Motivation and Context

When adding a number as tool parameter and removing it again, it is parsed as empty string which breaks the parsing at the server side. The error looks something like this:

MCP error 0: unmarshaling: json: cannot unmarshal string into Go struct field Request.count of type uint32

How Has This Been Tested?

I tested the changes by changing the input parameters and verifying the the values are sent as expected.

Breaking Changes

No

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally (actually no, the same tests as on the main branch are failing)
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

No

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.

Optional empty fields are sent as empty strings
1 participant