Skip to content

fix(tools/mongodb): concat filter params only once in mongodb update tools#1545

Merged
trehanshakuntG merged 2 commits into
mainfrom
trehanshakunt-mongodb-update-tools-fix
Sep 25, 2025
Merged

fix(tools/mongodb): concat filter params only once in mongodb update tools#1545
trehanshakuntG merged 2 commits into
mainfrom
trehanshakunt-mongodb-update-tools-fix

Conversation

@trehanshakuntG

@trehanshakuntG trehanshakuntG commented Sep 24, 2025

Copy link
Copy Markdown
Contributor

Description


What

Fixed a bug where FilterParams was being concatenated twice in the parameter list for MongoDB update operations.

Why

The duplicate concatenation would cause parameter validation to fail during tool initialization, preventing the MongoDB update tools from working.

Changes

  • mongodbupdateone.go: Fixed slices.Concat() to properly combine FilterParams and UpdateParams
  • mongodbupdatemany.go: Fixed slices.Concat() to properly combine FilterParams and UpdateParams

PR Checklist


Thank you for opening a Pull Request! Before submitting your PR, there are a
few things you can do to make sure it goes smoothly:

  • Make sure you reviewed
    CONTRIBUTING.md
  • Make sure to open an issue as a
    bug/issue
    before writing your code! That way we can discuss the change, evaluate
    designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)
  • Make sure to add ! if this involve a breaking change

@trehanshakuntG trehanshakuntG marked this pull request as ready for review September 24, 2025 09:05
@trehanshakuntG trehanshakuntG requested a review from a team September 24, 2025 09:05
@trehanshakuntG trehanshakuntG merged commit 295f9dc into main Sep 25, 2025
11 checks passed
@trehanshakuntG trehanshakuntG deleted the trehanshakunt-mongodb-update-tools-fix branch September 25, 2025 18:37
Yuan325 added a commit that referenced this pull request Sep 26, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.16.0](v0.15.0...v0.16.0)
(2025-09-25)


### ⚠ BREAKING CHANGES

* **tool/bigquery-execute-sql:** add allowed datasets support
([#1443](#1443))
* **tool/bigquery-forecast:** add allowed datasets support
([#1412](#1412))

### Features

* **cassandra:** Add Cassandra Source and Tool
([#1012](#1012))
([6e42053](6e42053))
* **sources/postgres:** Add application_name
([#1504](#1504))
([72a2366](72a2366))
* **tool/bigquery-execute-sql:** Add allowed datasets support
([#1443](#1443))
([9501ebb](9501ebb))
* **tool/bigquery-forecast:** Add allowed datasets support
([#1412](#1412))
([88bac7e](88bac7e))
* **tools/clickhouse-list-tables:** Add list-tables tool
([#1446](#1446))
([69a3caf](69a3caf))


### Bug Fixes

* **tool/mongodb-find:** Fix find tool `limit` field
([#1570](#1570))
([4166bf7](4166bf7))
* **tools/mongodb:** Concat filter params only once in mongodb update
tools ([#1545](#1545))
([295f9dc](295f9dc))

---
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 Teoh <45984206+Yuan325@users.noreply.github.com>
github-actions Bot pushed a commit that referenced this pull request Sep 26, 2025
🤖 I have created a release *beep* *boop*
---

##
[0.16.0](v0.15.0...v0.16.0)
(2025-09-25)

### ⚠ BREAKING CHANGES

* **tool/bigquery-execute-sql:** add allowed datasets support
([#1443](#1443))
* **tool/bigquery-forecast:** add allowed datasets support
([#1412](#1412))

### Features

* **cassandra:** Add Cassandra Source and Tool
([#1012](#1012))
([6e42053](6e42053))
* **sources/postgres:** Add application_name
([#1504](#1504))
([72a2366](72a2366))
* **tool/bigquery-execute-sql:** Add allowed datasets support
([#1443](#1443))
([9501ebb](9501ebb))
* **tool/bigquery-forecast:** Add allowed datasets support
([#1412](#1412))
([88bac7e](88bac7e))
* **tools/clickhouse-list-tables:** Add list-tables tool
([#1446](#1446))
([69a3caf](69a3caf))

### Bug Fixes

* **tool/mongodb-find:** Fix find tool `limit` field
([#1570](#1570))
([4166bf7](4166bf7))
* **tools/mongodb:** Concat filter params only once in mongodb update
tools ([#1545](#1545))
([295f9dc](295f9dc))

---
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 Teoh <45984206+Yuan325@users.noreply.github.com> 964a82e
github-actions Bot pushed a commit to renovate-bot/googleapis-_-genai-toolbox that referenced this pull request Sep 26, 2025
🤖 I have created a release *beep* *boop*
---

##
[0.16.0](googleapis/mcp-toolbox@v0.15.0...v0.16.0)
(2025-09-25)

### ⚠ BREAKING CHANGES

* **tool/bigquery-execute-sql:** add allowed datasets support
([googleapis#1443](googleapis#1443))
* **tool/bigquery-forecast:** add allowed datasets support
([googleapis#1412](googleapis#1412))

### Features

* **cassandra:** Add Cassandra Source and Tool
([googleapis#1012](googleapis#1012))
([6e42053](googleapis@6e42053))
* **sources/postgres:** Add application_name
([googleapis#1504](googleapis#1504))
([72a2366](googleapis@72a2366))
* **tool/bigquery-execute-sql:** Add allowed datasets support
([googleapis#1443](googleapis#1443))
([9501ebb](googleapis@9501ebb))
* **tool/bigquery-forecast:** Add allowed datasets support
([googleapis#1412](googleapis#1412))
([88bac7e](googleapis@88bac7e))
* **tools/clickhouse-list-tables:** Add list-tables tool
([googleapis#1446](googleapis#1446))
([69a3caf](googleapis@69a3caf))

### Bug Fixes

* **tool/mongodb-find:** Fix find tool `limit` field
([googleapis#1570](googleapis#1570))
([4166bf7](googleapis@4166bf7))
* **tools/mongodb:** Concat filter params only once in mongodb update
tools ([googleapis#1545](googleapis#1545))
([295f9dc](googleapis@295f9dc))

---
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 Teoh <45984206+Yuan325@users.noreply.github.com> 964a82e
github-actions Bot pushed a commit to Jaleel-zhu/genai-toolbox that referenced this pull request Sep 26, 2025
🤖 I have created a release *beep* *boop*
---

##
[0.16.0](googleapis/mcp-toolbox@v0.15.0...v0.16.0)
(2025-09-25)

### ⚠ BREAKING CHANGES

* **tool/bigquery-execute-sql:** add allowed datasets support
([googleapis#1443](googleapis#1443))
* **tool/bigquery-forecast:** add allowed datasets support
([googleapis#1412](googleapis#1412))

### Features

* **cassandra:** Add Cassandra Source and Tool
([googleapis#1012](googleapis#1012))
([6e42053](googleapis@6e42053))
* **sources/postgres:** Add application_name
([googleapis#1504](googleapis#1504))
([72a2366](googleapis@72a2366))
* **tool/bigquery-execute-sql:** Add allowed datasets support
([googleapis#1443](googleapis#1443))
([9501ebb](googleapis@9501ebb))
* **tool/bigquery-forecast:** Add allowed datasets support
([googleapis#1412](googleapis#1412))
([88bac7e](googleapis@88bac7e))
* **tools/clickhouse-list-tables:** Add list-tables tool
([googleapis#1446](googleapis#1446))
([69a3caf](googleapis@69a3caf))

### Bug Fixes

* **tool/mongodb-find:** Fix find tool `limit` field
([googleapis#1570](googleapis#1570))
([4166bf7](googleapis@4166bf7))
* **tools/mongodb:** Concat filter params only once in mongodb update
tools ([googleapis#1545](googleapis#1545))
([295f9dc](googleapis@295f9dc))

---
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 Teoh <45984206+Yuan325@users.noreply.github.com> 964a82e
github-actions Bot pushed a commit to bhardwajRahul/genai-toolbox that referenced this pull request Sep 26, 2025
🤖 I have created a release *beep* *boop*
---

##
[0.16.0](googleapis/mcp-toolbox@v0.15.0...v0.16.0)
(2025-09-25)

### ⚠ BREAKING CHANGES

* **tool/bigquery-execute-sql:** add allowed datasets support
([googleapis#1443](googleapis#1443))
* **tool/bigquery-forecast:** add allowed datasets support
([googleapis#1412](googleapis#1412))

### Features

* **cassandra:** Add Cassandra Source and Tool
([googleapis#1012](googleapis#1012))
([6e42053](googleapis@6e42053))
* **sources/postgres:** Add application_name
([googleapis#1504](googleapis#1504))
([72a2366](googleapis@72a2366))
* **tool/bigquery-execute-sql:** Add allowed datasets support
([googleapis#1443](googleapis#1443))
([9501ebb](googleapis@9501ebb))
* **tool/bigquery-forecast:** Add allowed datasets support
([googleapis#1412](googleapis#1412))
([88bac7e](googleapis@88bac7e))
* **tools/clickhouse-list-tables:** Add list-tables tool
([googleapis#1446](googleapis#1446))
([69a3caf](googleapis@69a3caf))

### Bug Fixes

* **tool/mongodb-find:** Fix find tool `limit` field
([googleapis#1570](googleapis#1570))
([4166bf7](googleapis@4166bf7))
* **tools/mongodb:** Concat filter params only once in mongodb update
tools ([googleapis#1545](googleapis#1545))
([295f9dc](googleapis@295f9dc))

---
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 Teoh <45984206+Yuan325@users.noreply.github.com> 964a82e
rahulpinto19 pushed a commit that referenced this pull request Sep 30, 2025
…tools (#1545)

## Description

---
### What

Fixed a bug where `FilterParams` was being concatenated twice in the
parameter list for MongoDB update operations.

### Why

The duplicate concatenation would cause parameter validation to fail
during tool initialization, preventing the MongoDB update tools from
working.

### Changes

- `mongodbupdateone.go`: Fixed `slices.Concat()` to properly combine
FilterParams and UpdateParams
- `mongodbupdatemany.go`: Fixed `slices.Concat()` to properly combine
FilterParams and UpdateParams

## PR Checklist

---
> Thank you for opening a Pull Request! Before submitting your PR, there
are a
> few things you can do to make sure it goes smoothly:

- [x] Make sure you reviewed

[CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md)
- [x] Make sure to open an issue as a

[bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose)
before writing your code! That way we can discuss the change, evaluate
  designs, and agree on the general idea
- [x] Ensure the tests and linter pass
- [x] Code coverage does not decrease (if any source code was changed)
- [x] Appropriate docs were updated (if necessary)
- [x] Make sure to add `!` if this involve a breaking change
rahulpinto19 pushed a commit that referenced this pull request Sep 30, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.16.0](v0.15.0...v0.16.0)
(2025-09-25)


### ⚠ BREAKING CHANGES

* **tool/bigquery-execute-sql:** add allowed datasets support
([#1443](#1443))
* **tool/bigquery-forecast:** add allowed datasets support
([#1412](#1412))

### Features

* **cassandra:** Add Cassandra Source and Tool
([#1012](#1012))
([6e42053](6e42053))
* **sources/postgres:** Add application_name
([#1504](#1504))
([72a2366](72a2366))
* **tool/bigquery-execute-sql:** Add allowed datasets support
([#1443](#1443))
([9501ebb](9501ebb))
* **tool/bigquery-forecast:** Add allowed datasets support
([#1412](#1412))
([88bac7e](88bac7e))
* **tools/clickhouse-list-tables:** Add list-tables tool
([#1446](#1446))
([69a3caf](69a3caf))


### Bug Fixes

* **tool/mongodb-find:** Fix find tool `limit` field
([#1570](#1570))
([4166bf7](4166bf7))
* **tools/mongodb:** Concat filter params only once in mongodb update
tools ([#1545](#1545))
([295f9dc](295f9dc))

---
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 Teoh <45984206+Yuan325@users.noreply.github.com>
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.16.0](googleapis/mcp-toolbox@v0.15.0...v0.16.0)
(2025-09-25)


### ⚠ BREAKING CHANGES

* **tool/bigquery-execute-sql:** add allowed datasets support
([#1443](googleapis/mcp-toolbox#1443))
* **tool/bigquery-forecast:** add allowed datasets support
([#1412](googleapis/mcp-toolbox#1412))

### Features

* **cassandra:** Add Cassandra Source and Tool
([#1012](googleapis/mcp-toolbox#1012))
([6e42053](googleapis/mcp-toolbox@6e42053))
* **sources/postgres:** Add application_name
([#1504](googleapis/mcp-toolbox#1504))
([72a2366](googleapis/mcp-toolbox@72a2366))
* **tool/bigquery-execute-sql:** Add allowed datasets support
([#1443](googleapis/mcp-toolbox#1443))
([9501ebb](googleapis/mcp-toolbox@9501ebb))
* **tool/bigquery-forecast:** Add allowed datasets support
([#1412](googleapis/mcp-toolbox#1412))
([88bac7e](googleapis/mcp-toolbox@88bac7e))
* **tools/clickhouse-list-tables:** Add list-tables tool
([#1446](googleapis/mcp-toolbox#1446))
([69a3caf](googleapis/mcp-toolbox@69a3caf))


### Bug Fixes

* **tool/mongodb-find:** Fix find tool `limit` field
([#1570](googleapis/mcp-toolbox#1570))
([4166bf7](googleapis/mcp-toolbox@4166bf7))
* **tools/mongodb:** Concat filter params only once in mongodb update
tools ([#1545](googleapis/mcp-toolbox#1545))
([295f9dc](googleapis/mcp-toolbox@295f9dc))

---
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 Teoh <45984206+Yuan325@users.noreply.github.com>
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.

3 participants