feat: add support for optional parameters - #617
Merged
Merged
Conversation
Yuan325
force-pushed
the
optional-params
branch
2 times, most recently
from
May 27, 2025 20:43
39f733b to
612487a
Compare
duwenxin99
reviewed
May 27, 2025
kurtisvg
requested changes
Jun 4, 2025
jeffreyrubi
pushed a commit
to jeffreyrubi/genai-toolbox
that referenced
this pull request
Jun 7, 2025
Yuan325
force-pushed
the
optional-params
branch
2 times, most recently
from
June 10, 2025 20:56
9a9e660 to
8dba93f
Compare
Contributor
kurtisvg
approved these changes
Jun 19, 2025
Contributor
Contributor
Contributor
|
🧨 Preview deployments removed. |
github-actions Bot
pushed a commit
that referenced
this pull request
Jun 20, 2025
Add a `default` field to parameters, that enables users to specify a
default value.
e.g.
```
parameters:
- name: name
type: string
default: "some-default-value"
description: The name of the hotel.
```
if this parameter is invoked without specifying `name`, the parameter
would default to "some-default-value"
For parameter manifest, there will be an additional `Required` field.
The default `Required` field is true. If a `default` value is presented,
`Required: false`. Array parameter's item's `Required` field will
inherit the array's `Required` field.
Fixes #475 4827771
github-actions Bot
pushed a commit
to renovate-bot/googleapis-_-genai-toolbox
that referenced
this pull request
Jun 20, 2025
Add a `default` field to parameters, that enables users to specify a
default value.
e.g.
```
parameters:
- name: name
type: string
default: "some-default-value"
description: The name of the hotel.
```
if this parameter is invoked without specifying `name`, the parameter
would default to "some-default-value"
For parameter manifest, there will be an additional `Required` field.
The default `Required` field is true. If a `default` value is presented,
`Required: false`. Array parameter's item's `Required` field will
inherit the array's `Required` field.
Fixes googleapis#475 4827771
anubhav756
added a commit
to GoogleCloudPlatform/cymbal-air-toolbox-demo
that referenced
this pull request
Jun 26, 2025
This PR adds a tools file equivalent to all the tools in the Cymbal Air app. > [!NOTE] > This tools file makes use of the new optional params feature (`default: ""`) from [#617](googleapis/mcp-toolbox#617).
duwenxin99
pushed a commit
to dennisg/genai-toolbox
that referenced
this pull request
Jul 1, 2025
Add a `default` field to parameters, that enables users to specify a
default value.
e.g.
```
parameters:
- name: name
type: string
default: "some-default-value"
description: The name of the hotel.
```
if this parameter is invoked without specifying `name`, the parameter
would default to "some-default-value"
For parameter manifest, there will be an additional `Required` field.
The default `Required` field is true. If a `default` value is presented,
`Required: false`. Array parameter's item's `Required` field will
inherit the array's `Required` field.
Fixes googleapis#475
Yuan325
added a commit
that referenced
this pull request
Jul 2, 2025
🤖 I have created a release *beep* *boop* --- ## [0.8.0](v0.7.0...v0.8.0) (2025-07-02) ### ⚠ BREAKING CHANGES * **postgres,mssql,cloudsqlmssql:** encode source connection url for sources ([#727](#727)) ### Features * Add support for multiple YAML configuration files ([#760](#760)) ([40679d7](40679d7)) * Add support for optional parameters ([#617](#617)) ([4827771](4827771)), closes [#475](#475) * **mcp:** Support MCP version 2025-03-26 ([#755](#755)) ([474df57](474df57)) * **sources/http:** Support disable SSL verification for HTTP Source ([#674](#674)) ([4055b0c](4055b0c)) * **tools/bigquery:** Add templateParameters field for bigquery ([#699](#699)) ([f5f771b](f5f771b)) * **tools/bigtable:** Add templateParameters field for bigtable ([#692](#692)) ([1c06771](1c06771)) * **tools/couchbase:** Add templateParameters field for couchbase ([#723](#723)) ([9197186](9197186)) * **tools/http:** Add support for HTTP Tool pathParams ([#726](#726)) ([fd300dc](fd300dc)) * **tools/redis:** Add Redis Source and Tool ([#519](#519)) ([f0aef29](f0aef29)) * **tools/spanner:** Add templateParameters field for spanner ([#691](#691)) ([075dfa4](075dfa4)) * **tools/sqlitesql:** Add templateParameters field for sqlitesql ([#687](#687)) ([75e254c](75e254c)) * **tools/valkey:** Add Valkey Source and Tool ([#532](#532)) ([054ec19](054ec19)) ### Bug Fixes * **bigquery,mssql:** Fix panic on tools with array param ([#722](#722)) ([7a6644c](7a6644c)) * **postgres,mssql,cloudsqlmssql:** Encode source connection url for sources ([#727](#727)) ([67964d9](67964d9)), closes [#717](#717) * Set default value to field's type during unmarshalling ([#774](#774)) ([fafed24](fafed24)), closes [#771](#771) * **server/mcp:** Do not listen from port for stdio ([#719](#719)) ([d51dbc7](d51dbc7)), closes [#711](#711) * **tools/mysqlexecutesql:** Handle nil panic and connection leak in Invoke ([#757](#757)) ([7badba4](7badba4)) * **tools/mysqlsql:** Handle nil panic and connection leak in invoke ([#758](#758)) ([cbb4a33](cbb4a33)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan <45984206+Yuan325@users.noreply.github.com>
github-actions Bot
pushed a commit
that referenced
this pull request
Jul 2, 2025
🤖 I have created a release *beep* *boop* --- ## [0.8.0](v0.7.0...v0.8.0) (2025-07-02) ### ⚠ BREAKING CHANGES * **postgres,mssql,cloudsqlmssql:** encode source connection url for sources ([#727](#727)) ### Features * Add support for multiple YAML configuration files ([#760](#760)) ([40679d7](40679d7)) * Add support for optional parameters ([#617](#617)) ([4827771](4827771)), closes [#475](#475) * **mcp:** Support MCP version 2025-03-26 ([#755](#755)) ([474df57](474df57)) * **sources/http:** Support disable SSL verification for HTTP Source ([#674](#674)) ([4055b0c](4055b0c)) * **tools/bigquery:** Add templateParameters field for bigquery ([#699](#699)) ([f5f771b](f5f771b)) * **tools/bigtable:** Add templateParameters field for bigtable ([#692](#692)) ([1c06771](1c06771)) * **tools/couchbase:** Add templateParameters field for couchbase ([#723](#723)) ([9197186](9197186)) * **tools/http:** Add support for HTTP Tool pathParams ([#726](#726)) ([fd300dc](fd300dc)) * **tools/redis:** Add Redis Source and Tool ([#519](#519)) ([f0aef29](f0aef29)) * **tools/spanner:** Add templateParameters field for spanner ([#691](#691)) ([075dfa4](075dfa4)) * **tools/sqlitesql:** Add templateParameters field for sqlitesql ([#687](#687)) ([75e254c](75e254c)) * **tools/valkey:** Add Valkey Source and Tool ([#532](#532)) ([054ec19](054ec19)) ### Bug Fixes * **bigquery,mssql:** Fix panic on tools with array param ([#722](#722)) ([7a6644c](7a6644c)) * **postgres,mssql,cloudsqlmssql:** Encode source connection url for sources ([#727](#727)) ([67964d9](67964d9)), closes [#717](#717) * Set default value to field's type during unmarshalling ([#774](#774)) ([fafed24](fafed24)), closes [#771](#771) * **server/mcp:** Do not listen from port for stdio ([#719](#719)) ([d51dbc7](d51dbc7)), closes [#711](#711) * **tools/mysqlexecutesql:** Handle nil panic and connection leak in Invoke ([#757](#757)) ([7badba4](7badba4)) * **tools/mysqlsql:** Handle nil panic and connection leak in invoke ([#758](#758)) ([cbb4a33](cbb4a33)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan <45984206+Yuan325@users.noreply.github.com> f13e963
github-actions Bot
pushed a commit
to renovate-bot/googleapis-_-genai-toolbox
that referenced
this pull request
Jul 2, 2025
🤖 I have created a release *beep* *boop* --- ## [0.8.0](googleapis/mcp-toolbox@v0.7.0...v0.8.0) (2025-07-02) ### ⚠ BREAKING CHANGES * **postgres,mssql,cloudsqlmssql:** encode source connection url for sources ([googleapis#727](googleapis#727)) ### Features * Add support for multiple YAML configuration files ([googleapis#760](googleapis#760)) ([40679d7](googleapis@40679d7)) * Add support for optional parameters ([googleapis#617](googleapis#617)) ([4827771](googleapis@4827771)), closes [googleapis#475](googleapis#475) * **mcp:** Support MCP version 2025-03-26 ([googleapis#755](googleapis#755)) ([474df57](googleapis@474df57)) * **sources/http:** Support disable SSL verification for HTTP Source ([googleapis#674](googleapis#674)) ([4055b0c](googleapis@4055b0c)) * **tools/bigquery:** Add templateParameters field for bigquery ([googleapis#699](googleapis#699)) ([f5f771b](googleapis@f5f771b)) * **tools/bigtable:** Add templateParameters field for bigtable ([googleapis#692](googleapis#692)) ([1c06771](googleapis@1c06771)) * **tools/couchbase:** Add templateParameters field for couchbase ([googleapis#723](googleapis#723)) ([9197186](googleapis@9197186)) * **tools/http:** Add support for HTTP Tool pathParams ([googleapis#726](googleapis#726)) ([fd300dc](googleapis@fd300dc)) * **tools/redis:** Add Redis Source and Tool ([googleapis#519](googleapis#519)) ([f0aef29](googleapis@f0aef29)) * **tools/spanner:** Add templateParameters field for spanner ([googleapis#691](googleapis#691)) ([075dfa4](googleapis@075dfa4)) * **tools/sqlitesql:** Add templateParameters field for sqlitesql ([googleapis#687](googleapis#687)) ([75e254c](googleapis@75e254c)) * **tools/valkey:** Add Valkey Source and Tool ([googleapis#532](googleapis#532)) ([054ec19](googleapis@054ec19)) ### Bug Fixes * **bigquery,mssql:** Fix panic on tools with array param ([googleapis#722](googleapis#722)) ([7a6644c](googleapis@7a6644c)) * **postgres,mssql,cloudsqlmssql:** Encode source connection url for sources ([googleapis#727](googleapis#727)) ([67964d9](googleapis@67964d9)), closes [googleapis#717](googleapis#717) * Set default value to field's type during unmarshalling ([googleapis#774](googleapis#774)) ([fafed24](googleapis@fafed24)), closes [googleapis#771](googleapis#771) * **server/mcp:** Do not listen from port for stdio ([googleapis#719](googleapis#719)) ([d51dbc7](googleapis@d51dbc7)), closes [googleapis#711](googleapis#711) * **tools/mysqlexecutesql:** Handle nil panic and connection leak in Invoke ([googleapis#757](googleapis#757)) ([7badba4](googleapis@7badba4)) * **tools/mysqlsql:** Handle nil panic and connection leak in invoke ([googleapis#758](googleapis#758)) ([cbb4a33](googleapis@cbb4a33)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan <45984206+Yuan325@users.noreply.github.com> f13e963
duwenxin99
pushed a commit
that referenced
this pull request
Jul 2, 2025
🤖 I have created a release *beep* *boop* --- ## [0.8.0](v0.7.0...v0.8.0) (2025-07-02) ### ⚠ BREAKING CHANGES * **postgres,mssql,cloudsqlmssql:** encode source connection url for sources ([#727](#727)) ### Features * Add support for multiple YAML configuration files ([#760](#760)) ([40679d7](40679d7)) * Add support for optional parameters ([#617](#617)) ([4827771](4827771)), closes [#475](#475) * **mcp:** Support MCP version 2025-03-26 ([#755](#755)) ([474df57](474df57)) * **sources/http:** Support disable SSL verification for HTTP Source ([#674](#674)) ([4055b0c](4055b0c)) * **tools/bigquery:** Add templateParameters field for bigquery ([#699](#699)) ([f5f771b](f5f771b)) * **tools/bigtable:** Add templateParameters field for bigtable ([#692](#692)) ([1c06771](1c06771)) * **tools/couchbase:** Add templateParameters field for couchbase ([#723](#723)) ([9197186](9197186)) * **tools/http:** Add support for HTTP Tool pathParams ([#726](#726)) ([fd300dc](fd300dc)) * **tools/redis:** Add Redis Source and Tool ([#519](#519)) ([f0aef29](f0aef29)) * **tools/spanner:** Add templateParameters field for spanner ([#691](#691)) ([075dfa4](075dfa4)) * **tools/sqlitesql:** Add templateParameters field for sqlitesql ([#687](#687)) ([75e254c](75e254c)) * **tools/valkey:** Add Valkey Source and Tool ([#532](#532)) ([054ec19](054ec19)) ### Bug Fixes * **bigquery,mssql:** Fix panic on tools with array param ([#722](#722)) ([7a6644c](7a6644c)) * **postgres,mssql,cloudsqlmssql:** Encode source connection url for sources ([#727](#727)) ([67964d9](67964d9)), closes [#717](#717) * Set default value to field's type during unmarshalling ([#774](#774)) ([fafed24](fafed24)), closes [#771](#771) * **server/mcp:** Do not listen from port for stdio ([#719](#719)) ([d51dbc7](d51dbc7)), closes [#711](#711) * **tools/mysqlexecutesql:** Handle nil panic and connection leak in Invoke ([#757](#757)) ([7badba4](7badba4)) * **tools/mysqlsql:** Handle nil panic and connection leak in invoke ([#758](#758)) ([cbb4a33](cbb4a33)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan <45984206+Yuan325@users.noreply.github.com>
This was referenced Feb 18, 2026
Closed
NightStack15
added a commit
to NightStack15/googleapis-_-genai-toolbox
that referenced
this pull request
Mar 20, 2026
🤖 I have created a release *beep* *boop* --- ## [0.8.0](googleapis/mcp-toolbox@v0.7.0...v0.8.0) (2025-07-02) ### ⚠ BREAKING CHANGES * **postgres,mssql,cloudsqlmssql:** encode source connection url for sources ([#727](googleapis/mcp-toolbox#727)) ### Features * Add support for multiple YAML configuration files ([#760](googleapis/mcp-toolbox#760)) ([40679d7](googleapis/mcp-toolbox@40679d7)) * Add support for optional parameters ([#617](googleapis/mcp-toolbox#617)) ([4827771](googleapis/mcp-toolbox@4827771)), closes [#475](googleapis/mcp-toolbox#475) * **mcp:** Support MCP version 2025-03-26 ([#755](googleapis/mcp-toolbox#755)) ([474df57](googleapis/mcp-toolbox@474df57)) * **sources/http:** Support disable SSL verification for HTTP Source ([#674](googleapis/mcp-toolbox#674)) ([4055b0c](googleapis/mcp-toolbox@4055b0c)) * **tools/bigquery:** Add templateParameters field for bigquery ([#699](googleapis/mcp-toolbox#699)) ([f5f771b](googleapis/mcp-toolbox@f5f771b)) * **tools/bigtable:** Add templateParameters field for bigtable ([#692](googleapis/mcp-toolbox#692)) ([1c06771](googleapis/mcp-toolbox@1c06771)) * **tools/couchbase:** Add templateParameters field for couchbase ([#723](googleapis/mcp-toolbox#723)) ([9197186](googleapis/mcp-toolbox@9197186)) * **tools/http:** Add support for HTTP Tool pathParams ([#726](googleapis/mcp-toolbox#726)) ([fd300dc](googleapis/mcp-toolbox@fd300dc)) * **tools/redis:** Add Redis Source and Tool ([#519](googleapis/mcp-toolbox#519)) ([f0aef29](googleapis/mcp-toolbox@f0aef29)) * **tools/spanner:** Add templateParameters field for spanner ([#691](googleapis/mcp-toolbox#691)) ([075dfa4](googleapis/mcp-toolbox@075dfa4)) * **tools/sqlitesql:** Add templateParameters field for sqlitesql ([#687](googleapis/mcp-toolbox#687)) ([75e254c](googleapis/mcp-toolbox@75e254c)) * **tools/valkey:** Add Valkey Source and Tool ([#532](googleapis/mcp-toolbox#532)) ([054ec19](googleapis/mcp-toolbox@054ec19)) ### Bug Fixes * **bigquery,mssql:** Fix panic on tools with array param ([#722](googleapis/mcp-toolbox#722)) ([7a6644c](googleapis/mcp-toolbox@7a6644c)) * **postgres,mssql,cloudsqlmssql:** Encode source connection url for sources ([#727](googleapis/mcp-toolbox#727)) ([67964d9](googleapis/mcp-toolbox@67964d9)), closes [#717](googleapis/mcp-toolbox#717) * Set default value to field's type during unmarshalling ([#774](googleapis/mcp-toolbox#774)) ([fafed24](googleapis/mcp-toolbox@fafed24)), closes [#771](googleapis/mcp-toolbox#771) * **server/mcp:** Do not listen from port for stdio ([#719](googleapis/mcp-toolbox#719)) ([d51dbc7](googleapis/mcp-toolbox@d51dbc7)), closes [#711](googleapis/mcp-toolbox#711) * **tools/mysqlexecutesql:** Handle nil panic and connection leak in Invoke ([#757](googleapis/mcp-toolbox#757)) ([7badba4](googleapis/mcp-toolbox@7badba4)) * **tools/mysqlsql:** Handle nil panic and connection leak in invoke ([#758](googleapis/mcp-toolbox#758)) ([cbb4a33](googleapis/mcp-toolbox@cbb4a33)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan <45984206+Yuan325@users.noreply.github.com>
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.
Add a
defaultfield to parameters, that enables users to specify a default value.e.g.
if this parameter is invoked without specifying
name, the parameter would default to "some-default-value"For parameter manifest, there will be an additional
Requiredfield. The defaultRequiredfield is true. If adefaultvalue is presented,Required: false. Array parameter's item'sRequiredfield will inherit the array'sRequiredfield.Fixes #475