Skip to content

Conversation

dishaprakash
Copy link
Collaborator

@dishaprakash dishaprakash commented Jul 5, 2025

This PR introduces full support for optional parameters, corresponding to the feature added to the Toolbox server (googleapis/genai-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 as a code owner July 5, 2025 18:49
@dishaprakash dishaprakash merged commit f43d767 into main Jul 7, 2025
5 checks passed
@dishaprakash dishaprakash deleted the add-optional branch July 8, 2025 17:24
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