Skip to content

chore: Add support for optional parameters - #25

Merged
dishaprakash merged 5 commits into
mainfrom
add-optional
Jul 7, 2025
Merged

dishaprakash merged 5 commits into
mainfrom
add-optional

Conversation

@dishaprakash

@dishaprakash dishaprakash commented Jul 5, 2025 •

Copy link
Copy Markdown
Contributor

This PR introduces full support for optional parameters, corresponding to the feature added to the Toolbox server (googleapis/mcp-toolbox#617).

This change is similar to the support of optional parameters in the python SDK (googleapis/mcp-toolbox-sdk-python#290)

Overview of changes

  1. ParameterSchema : The struct now includes a field called required, allowing the tools to have optional parameters
  2. Parameter validation : The validation check now will not throw an error if the value is nil, given that the parameter is optional.
  3. Cleaner payload: Any parameter with a null value will be omitted from the payload

@dishaprakash
dishaprakash requested a review from a team July 5, 2025 18:49
Comment thread core/protocol.go
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.

2 participants