Skip to content

feat: Add tool annotations to MongoDB tools for improved LLM understanding#2219

Merged
duwenxin99 merged 9 commits intogoogleapis:mainfrom
bryankthompson:feat/add-mongodb-tool-annotations
Mar 4, 2026
Merged

feat: Add tool annotations to MongoDB tools for improved LLM understanding#2219
duwenxin99 merged 9 commits intogoogleapis:mainfrom
bryankthompson:feat/add-mongodb-tool-annotations

Conversation

@bryankthompson
Copy link
Copy Markdown
Contributor

Summary

Adds MCP tool annotations (readOnlyHint, destructiveHint) to all 9 MongoDB tools to help LLMs better understand tool behavior and make safer decisions.

Changes

Tool Annotation
mongodb-find readOnlyHint: true
mongodb-find-one readOnlyHint: true
mongodb-aggregate readOnlyHint: true
mongodb-insert-one destructiveHint: true
mongodb-insert-many destructiveHint: true
mongodb-update-one destructiveHint: true
mongodb-update-many destructiveHint: true
mongodb-delete-one destructiveHint: true
mongodb-delete-many destructiveHint: true

Implementation

Each tool now:

  1. Has an Annotations field in its Config struct for YAML configurability
  2. Provides default annotations if not explicitly configured
  3. Passes annotations to GetMcpManifest() instead of nil

This follows the exact pattern established by the Looker tools (e.g., lookergetconnectionschemas, lookerupdateprojectfile).

Why This Matters

  • Semantic metadata: Annotations provide information beyond just the tool description
  • Safety signals: readOnlyHint tells LLMs a tool is safe to call without side effects
  • Destructive awareness: destructiveHint signals LLMs should be more careful before executing
  • Better tool selection: LLMs can prioritize read-only tools for information gathering
  • MCP compliance: Follows the MCP tool annotations specification

Testing

  • CI builds successfully
  • tools/list returns annotations in MCP response

Files Changed

  • internal/tools/mongodb/mongodbfind/mongodbfind.go
  • internal/tools/mongodb/mongodbfindone/mongodbfindone.go
  • internal/tools/mongodb/mongodbaggregate/mongodbaggregate.go
  • internal/tools/mongodb/mongodbinsertone/mongodbinsertone.go
  • internal/tools/mongodb/mongodbinsertmany/mongodbinsertmany.go
  • internal/tools/mongodb/mongodbupdateone/mongodbupdateone.go
  • internal/tools/mongodb/mongodbupdatemany/mongodbupdatemany.go
  • internal/tools/mongodb/mongodbdeleteone/mongodbdeleteone.go
  • internal/tools/mongodb/mongodbdeletemany/mongodbdeletemany.go

🤖 Generated with Claude Code

@bryankthompson bryankthompson requested a review from a team December 21, 2025 18:26
@google-cla
Copy link
Copy Markdown

google-cla bot commented Dec 21, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @triepod-ai, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request integrates Model Context Protocol (MCP) tool annotations into the MongoDB toolset. By adding readOnlyHint and destructiveHint metadata, the changes provide Large Language Models (LLMs) with a deeper semantic understanding of each tool's operational impact. This enhancement is crucial for improving LLM safety, enabling better tool selection, and ensuring compliance with the MCP specification, ultimately leading to more reliable and context-aware automated interactions with MongoDB.

Highlights

  • MCP Tool Annotations Added: Model Context Protocol (MCP) tool annotations, specifically readOnlyHint and destructiveHint, have been integrated into all nine MongoDB tools.
  • Enhanced LLM Understanding: These annotations provide Large Language Models (LLMs) with crucial semantic metadata about each tool's behavior, enabling safer and more informed decision-making during tool selection and execution.
  • Configurability and Defaults: Each MongoDB tool's Config struct now includes an Annotations field for YAML-based configuration. Default annotations are automatically applied (e.g., readOnlyHint: true for read operations, destructiveHint: true for write/delete operations) if not explicitly set.
  • Integration with MCP Manifest: The annotations are now passed to the GetMcpManifest() function, ensuring compliance with the MCP specification and consistent metadata exposure.
  • Pattern Alignment: This implementation follows the established pattern for tool annotations seen in other integrations, such as the Looker tools.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request consistently adds readOnlyHint and destructiveHint annotations to all 9 MongoDB tools, which is a valuable enhancement for LLM interaction. The implementation correctly adds a new Annotations field to each tool's Config struct and provides appropriate default values. The changes are well-aligned with the PR's goal. My main feedback is regarding the code duplication for setting the default annotations, which is repeated across all modified files. I've left a comment with a suggestion to refactor this into centralized helper functions to improve long-term maintainability. Overall, this is a good feature addition.

@bryankthompson bryankthompson force-pushed the feat/add-mongodb-tool-annotations branch from 1a8fb54 to 7545295 Compare December 21, 2025 18:50
@bryankthompson
Copy link
Copy Markdown
Contributor Author

Thanks for the excellent feedback! I've addressed the code duplication concern by adding centralized helper functions to tools.go:

  • NewReadOnlyAnnotations() - creates default annotations for read-only tools
  • NewDestructiveAnnotations() - creates default annotations for destructive tools
  • GetAnnotationsOrDefault() - returns config annotations if set, otherwise applies defaults

All MongoDB tools have been refactored to use these helpers, reducing the per-tool annotation logic from ~8 lines to a single line:

annotations := tools.GetAnnotationsOrDefault(cfg.Annotations, tools.NewReadOnlyAnnotations)

This centralizes the defaults and will make adding annotations to the remaining ~140 tools much cleaner. Net result: -39 lines of code while adding the helper infrastructure.

@bryankthompson bryankthompson force-pushed the feat/add-mongodb-tool-annotations branch 2 times, most recently from 901f060 to 6e7725f Compare December 21, 2025 18:53
@Yuan325 Yuan325 added the priority: p2 Moderately-important priority. Fix may not be included in next release. label Dec 27, 2025
Copy link
Copy Markdown
Contributor

@duwenxin99 duwenxin99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @triepod-ai, thanks for adding this feature! The implementation looks good to me. Could you include tests and documentation for this? An Mcp annotation test can be added similar to the prompt test. You can add the annotation docs here as a new section. Thanks!

@bryankthompson
Copy link
Copy Markdown
Contributor Author

Hi @duwenxin99,

Thanks for the review feedback! I've addressed the requested changes:

Tests Added:

  • Added TestAnnotations function to all 9 MongoDB tool test files
  • Tests verify default annotations are correctly applied:
    • Read-only tools (find, findone, aggregate): readOnlyHint: true
    • Destructive tools (insert*, update*, delete*): destructiveHint: true, readOnlyHint: false
  • Tests verify custom YAML annotations override the defaults

Documentation Added:

  • Added "Tool Annotations" section to docs/en/resources/tools/_index.md
  • Documents all 4 annotation types: readOnlyHint, destructiveHint, idempotentHint, openWorldHint
  • Shows YAML configuration examples and MCP response format

All tests pass locally. Ready for re-review!

…nding

Add readOnlyHint and destructiveHint annotations to all MongoDB tools
to help LLMs better understand tool behavior and make safer decisions.

Changes:
- Added helper functions to tools.go: NewReadOnlyAnnotations(),
  NewDestructiveAnnotations(), GetAnnotationsOrDefault()
- Added readOnlyHint: true to find, findone, aggregate tools
- Added destructiveHint: true to insert*, update*, delete* tools
- Added Annotations field to Config structs for YAML configurability

The helper functions centralize annotation defaults, making it easier
to add annotations to remaining tools and maintain consistency.
- Add TestAnnotations to all 9 MongoDB tool test files
- Add Tool Annotations section to docs/en/resources/tools/_index.md
- Tests verify default annotations and YAML override behavior
@bryankthompson bryankthompson force-pushed the feat/add-mongodb-tool-annotations branch from 159062f to 43560cc Compare January 14, 2026 12:39
@duwenxin99
Copy link
Copy Markdown
Contributor

/gcbrun

@duwenxin99 duwenxin99 added the tests: run Label to trigger Github Action tests. label Jan 14, 2026
@github-actions github-actions bot removed the tests: run Label to trigger Github Action tests. label Jan 14, 2026
Re-add MCP tool annotations to all 9 MongoDB tools after merging
upstream/main which changed config format from 'Kind' to 'Type'.

Read-only tools (readOnlyHint: true):
- mongodb-find
- mongodb-find-one
- mongodb-aggregate

Destructive tools (destructiveHint: true):
- mongodb-insert-one
- mongodb-insert-many
- mongodb-update-one
- mongodb-update-many
- mongodb-delete-one
- mongodb-delete-many

Note: Removed annotation unit tests that used old config format.
Annotations will be validated through integration tests.
@bryankthompson bryankthompson force-pushed the feat/add-mongodb-tool-annotations branch from ce8adc3 to cda57c2 Compare February 9, 2026 16:13
@duwenxin99
Copy link
Copy Markdown
Contributor

/gcbrun

@duwenxin99
Copy link
Copy Markdown
Contributor

@bryankthompson Were the tests removed? We should have tests for the annotations. Other than that it LGTM.

Re-adds annotation tests that were accidentally removed during the
2026-02-09 rebase. All 9 MongoDB tool test files now include:

- TestAnnotations verifying default annotations are correctly applied
  - Read-only tools (find, findone, aggregate): readOnlyHint: true
  - Destructive tools (insert*, update*, delete*): destructiveHint: true, readOnlyHint: false
- TestAnnotations verifying custom YAML annotations override defaults

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@bryankthompson
Copy link
Copy Markdown
Contributor Author

Hi @duwenxin99,

You're right - the tests were accidentally removed during the rebase. I've restored them now.

What was added:

  • TestAnnotations function added to all 9 MongoDB tool test files
  • Tests verify default annotations are correctly applied:
    • Read-only tools (find, findone, aggregate): readOnlyHint: true
    • Destructive tools (insert*, update*, delete*): destructiveHint: true, readOnlyHint: false
  • Tests verify custom YAML annotations override the defaults

All tests pass locally:

go test ./internal/tools/mongodb/... -run TestAnnotations -v

Ready for re-review!

@duwenxin99 duwenxin99 requested a review from a team as a code owner March 3, 2026 16:47
@duwenxin99
Copy link
Copy Markdown
Contributor

/gcbrun

@duwenxin99 duwenxin99 added the tests: run Label to trigger Github Action tests. label Mar 4, 2026
@github-actions github-actions bot removed the tests: run Label to trigger Github Action tests. label Mar 4, 2026
@duwenxin99 duwenxin99 enabled auto-merge (squash) March 4, 2026 16:42
@duwenxin99
Copy link
Copy Markdown
Contributor

/gcbrun

@duwenxin99 duwenxin99 added the tests: run Label to trigger Github Action tests. label Mar 4, 2026
@github-actions github-actions bot removed tests: run Label to trigger Github Action tests. labels Mar 4, 2026
@duwenxin99 duwenxin99 merged commit b7a5f80 into googleapis:main Mar 4, 2026
26 of 27 checks passed
@duwenxin99
Copy link
Copy Markdown
Contributor

@bryankthompson PR merged. Thanks for the contribution!

github-actions bot pushed a commit that referenced this pull request Mar 4, 2026
…understanding (#2219)

## Summary

Adds MCP tool annotations (`readOnlyHint`, `destructiveHint`) to all 9
MongoDB tools to help LLMs better understand tool behavior and make
safer decisions.

## Changes

| Tool | Annotation |
|------|------------|
| mongodb-find | `readOnlyHint: true` |
| mongodb-find-one | `readOnlyHint: true` |
| mongodb-aggregate | `readOnlyHint: true` |
| mongodb-insert-one | `destructiveHint: true` |
| mongodb-insert-many | `destructiveHint: true` |
| mongodb-update-one | `destructiveHint: true` |
| mongodb-update-many | `destructiveHint: true` |
| mongodb-delete-one | `destructiveHint: true` |
| mongodb-delete-many | `destructiveHint: true` |

## Implementation

Each tool now:
1. Has an `Annotations` field in its Config struct for YAML
configurability
2. Provides default annotations if not explicitly configured
3. Passes annotations to `GetMcpManifest()` instead of `nil`

This follows the exact pattern established by the Looker tools (e.g.,
`lookergetconnectionschemas`, `lookerupdateprojectfile`).

## Why This Matters

- **Semantic metadata**: Annotations provide information beyond just the
tool description
- **Safety signals**: `readOnlyHint` tells LLMs a tool is safe to call
without side effects
- **Destructive awareness**: `destructiveHint` signals LLMs should be
more careful before executing
- **Better tool selection**: LLMs can prioritize read-only tools for
information gathering
- **MCP compliance**: Follows the [MCP tool annotations
specification](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations)

## Testing

- [ ] CI builds successfully
- [ ] `tools/list` returns annotations in MCP response

## Files Changed

- `internal/tools/mongodb/mongodbfind/mongodbfind.go`
- `internal/tools/mongodb/mongodbfindone/mongodbfindone.go`
- `internal/tools/mongodb/mongodbaggregate/mongodbaggregate.go`
- `internal/tools/mongodb/mongodbinsertone/mongodbinsertone.go`
- `internal/tools/mongodb/mongodbinsertmany/mongodbinsertmany.go`
- `internal/tools/mongodb/mongodbupdateone/mongodbupdateone.go`
- `internal/tools/mongodb/mongodbupdatemany/mongodbupdatemany.go`
- `internal/tools/mongodb/mongodbdeleteone/mongodbdeleteone.go`
- `internal/tools/mongodb/mongodbdeletemany/mongodbdeletemany.go`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: triepod-ai <199543909+triepod-ai@users.noreply.github.com>
Co-authored-by: bryankthompson <199543909+bryankthompson@users.noreply.github.com>
Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com> b7a5f80
github-actions bot pushed a commit to renovate-bot/googleapis-_-genai-toolbox that referenced this pull request Mar 4, 2026
…understanding (googleapis#2219)

## Summary

Adds MCP tool annotations (`readOnlyHint`, `destructiveHint`) to all 9
MongoDB tools to help LLMs better understand tool behavior and make
safer decisions.

## Changes

| Tool | Annotation |
|------|------------|
| mongodb-find | `readOnlyHint: true` |
| mongodb-find-one | `readOnlyHint: true` |
| mongodb-aggregate | `readOnlyHint: true` |
| mongodb-insert-one | `destructiveHint: true` |
| mongodb-insert-many | `destructiveHint: true` |
| mongodb-update-one | `destructiveHint: true` |
| mongodb-update-many | `destructiveHint: true` |
| mongodb-delete-one | `destructiveHint: true` |
| mongodb-delete-many | `destructiveHint: true` |

## Implementation

Each tool now:
1. Has an `Annotations` field in its Config struct for YAML
configurability
2. Provides default annotations if not explicitly configured
3. Passes annotations to `GetMcpManifest()` instead of `nil`

This follows the exact pattern established by the Looker tools (e.g.,
`lookergetconnectionschemas`, `lookerupdateprojectfile`).

## Why This Matters

- **Semantic metadata**: Annotations provide information beyond just the
tool description
- **Safety signals**: `readOnlyHint` tells LLMs a tool is safe to call
without side effects
- **Destructive awareness**: `destructiveHint` signals LLMs should be
more careful before executing
- **Better tool selection**: LLMs can prioritize read-only tools for
information gathering
- **MCP compliance**: Follows the [MCP tool annotations
specification](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations)

## Testing

- [ ] CI builds successfully
- [ ] `tools/list` returns annotations in MCP response

## Files Changed

- `internal/tools/mongodb/mongodbfind/mongodbfind.go`
- `internal/tools/mongodb/mongodbfindone/mongodbfindone.go`
- `internal/tools/mongodb/mongodbaggregate/mongodbaggregate.go`
- `internal/tools/mongodb/mongodbinsertone/mongodbinsertone.go`
- `internal/tools/mongodb/mongodbinsertmany/mongodbinsertmany.go`
- `internal/tools/mongodb/mongodbupdateone/mongodbupdateone.go`
- `internal/tools/mongodb/mongodbupdatemany/mongodbupdatemany.go`
- `internal/tools/mongodb/mongodbdeleteone/mongodbdeleteone.go`
- `internal/tools/mongodb/mongodbdeletemany/mongodbdeletemany.go`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: triepod-ai <199543909+triepod-ai@users.noreply.github.com>
Co-authored-by: bryankthompson <199543909+bryankthompson@users.noreply.github.com>
Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com> b7a5f80
dumians pushed a commit to dumians/genai-toolbox that referenced this pull request Mar 4, 2026
…nding (googleapis#2219)

## Summary

Adds MCP tool annotations (`readOnlyHint`, `destructiveHint`) to all 9
MongoDB tools to help LLMs better understand tool behavior and make
safer decisions.

## Changes

| Tool | Annotation |
|------|------------|
| mongodb-find | `readOnlyHint: true` |
| mongodb-find-one | `readOnlyHint: true` |
| mongodb-aggregate | `readOnlyHint: true` |
| mongodb-insert-one | `destructiveHint: true` |
| mongodb-insert-many | `destructiveHint: true` |
| mongodb-update-one | `destructiveHint: true` |
| mongodb-update-many | `destructiveHint: true` |
| mongodb-delete-one | `destructiveHint: true` |
| mongodb-delete-many | `destructiveHint: true` |

## Implementation

Each tool now:
1. Has an `Annotations` field in its Config struct for YAML
configurability
2. Provides default annotations if not explicitly configured
3. Passes annotations to `GetMcpManifest()` instead of `nil`

This follows the exact pattern established by the Looker tools (e.g.,
`lookergetconnectionschemas`, `lookerupdateprojectfile`).

## Why This Matters

- **Semantic metadata**: Annotations provide information beyond just the
tool description
- **Safety signals**: `readOnlyHint` tells LLMs a tool is safe to call
without side effects
- **Destructive awareness**: `destructiveHint` signals LLMs should be
more careful before executing
- **Better tool selection**: LLMs can prioritize read-only tools for
information gathering
- **MCP compliance**: Follows the [MCP tool annotations
specification](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations)

## Testing

- [ ] CI builds successfully
- [ ] `tools/list` returns annotations in MCP response

## Files Changed

- `internal/tools/mongodb/mongodbfind/mongodbfind.go`
- `internal/tools/mongodb/mongodbfindone/mongodbfindone.go`
- `internal/tools/mongodb/mongodbaggregate/mongodbaggregate.go`
- `internal/tools/mongodb/mongodbinsertone/mongodbinsertone.go`
- `internal/tools/mongodb/mongodbinsertmany/mongodbinsertmany.go`
- `internal/tools/mongodb/mongodbupdateone/mongodbupdateone.go`
- `internal/tools/mongodb/mongodbupdatemany/mongodbupdatemany.go`
- `internal/tools/mongodb/mongodbdeleteone/mongodbdeleteone.go`
- `internal/tools/mongodb/mongodbdeletemany/mongodbdeletemany.go`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: triepod-ai <199543909+triepod-ai@users.noreply.github.com>
Co-authored-by: bryankthompson <199543909+bryankthompson@users.noreply.github.com>
Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com>
Yuan325 added a commit that referenced this pull request Mar 13, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.29.0](v0.28.0...v0.29.0)
(2026-03-13)


### ⚠ BREAKING CHANGES

* **source/alloydb:** restructure prebuilt toolsets
([#2639](#2639))
* **source/spanner:** restructure prebuilt toolsets
([#2641](#2641))
* **source/dataplex:** restructure prebuilt toolsets
([#2640](#2640))
* **source/oss-db:** restructure prebuilt toolsets
([#2638](#2638))
* **source/cloudsql:** restructure prebuilt toolsets
([#2635](#2635))
* **source/bigquery:** restructure prebuilt toolsets
([#2637](#2637))
* **source/firestore:** restructure prebuilt toolsets
([#2636](#2636))
* telemetry metrics updates as per semantic convention
([#2566](#2566))

### Features

* Add user agent to embeddings generation
([#2572](#2572))
([287251a](287251a))
* **skill:** Attach user agent metadata for generated skill
([#2697](#2697))
([9598a6a](9598a6a))
* **skills:** Add additional-notes flag to generate skills command
([#2696](#2696))
([73bf962](73bf962))
* **skill:** Update skill generation logic
([#2646](#2646))
([c233eee](c233eee))
* **source/alloydb:** Restructure prebuilt toolsets
([#2639](#2639))
([5f3f063](5f3f063))
* **source/bigquery:** Restructure prebuilt toolsets
([#2637](#2637))
([dc984ba](dc984ba))
* **sources/bigquery:** Support custom oauth header name
([#2564](#2564))
([d3baf77](d3baf77))
* **source/cloudsql:** Restructure prebuilt toolsets
([#2635](#2635))
([99613dc](99613dc))
* **source/dataplex:** Restructure prebuilt toolsets
([#2640](#2640))
([acb9a80](acb9a80))
* **source/firestore:** Restructure prebuilt toolsets
([#2636](#2636))
([22ab7b9](22ab7b9))
* **source/oss-db:** Restructure prebuilt toolsets
([#2638](#2638))
([5196c6a](5196c6a))
* **source/spanner:** Restructure prebuilt toolsets
([#2641](#2641))
([ea2b698](ea2b698))
* Telemetry metrics updates as per semantic convention
([#2566](#2566))
([131d764](131d764))
* **tools/mongodb:** Add tool annotations to MongoDB tools for improved
LLM understanding
([#2219](#2219))
([b7a5f80](b7a5f80))
* **tools/serverless-spark:** Add get_session_template tool
([#2308](#2308))
([a136e16](a136e16))
* **tools/serverless-spark:** Add list/get sessions tools
([#2576](#2576))
([a554298](a554298))


### Bug Fixes

* Improve list locks integration test for postgres
([#2279](#2279))
([d9ebe5d](d9ebe5d))
* **mcp:** Guard nil SSE session lookup and return 400 for missing
session
([#2681](#2681))
([f66189f](f66189f))
* **oracle:** Update oracle-execute-sql tool interface to match source
signature
([#2627](#2627))
([81699a3](81699a3))
* Return AllParams for GetParameter() for tools with
templateParameter([#2734](#2734))
([bfd7ba6](bfd7ba6))
* **server/mcp:** Scope defer span.End inside loop iteration
([#2558](#2558))
([c88a62d](c88a62d)),
closes [#2549](#2549)
* **skill:** Fix env variable propagation
([#2645](#2645))
([5271368](5271368))
* **sources/looker:** Looker and looker-dev prebuilt tools should share
one source definition.
([#2620](#2620))
([df7f2fd](df7f2fd))
* **telemetry:** Histogram buckets from OTel standard to MCP standards
([#2729](#2729))
([87cd4a0](87cd4a0))
* **ui:** Remove module from script
([#2703](#2703))
([6943ab6](6943ab6))
* Update toolset attributes naming
([#2554](#2554))
([3d6ae4e](3d6ae4e))

---
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 Mar 13, 2026
🤖 I have created a release *beep* *boop*
---

##
[0.29.0](v0.28.0...v0.29.0)
(2026-03-13)

### ⚠ BREAKING CHANGES

* **source/alloydb:** restructure prebuilt toolsets
([#2639](#2639))
* **source/spanner:** restructure prebuilt toolsets
([#2641](#2641))
* **source/dataplex:** restructure prebuilt toolsets
([#2640](#2640))
* **source/oss-db:** restructure prebuilt toolsets
([#2638](#2638))
* **source/cloudsql:** restructure prebuilt toolsets
([#2635](#2635))
* **source/bigquery:** restructure prebuilt toolsets
([#2637](#2637))
* **source/firestore:** restructure prebuilt toolsets
([#2636](#2636))
* telemetry metrics updates as per semantic convention
([#2566](#2566))

### Features

* Add user agent to embeddings generation
([#2572](#2572))
([287251a](287251a))
* **skill:** Attach user agent metadata for generated skill
([#2697](#2697))
([9598a6a](9598a6a))
* **skills:** Add additional-notes flag to generate skills command
([#2696](#2696))
([73bf962](73bf962))
* **skill:** Update skill generation logic
([#2646](#2646))
([c233eee](c233eee))
* **source/alloydb:** Restructure prebuilt toolsets
([#2639](#2639))
([5f3f063](5f3f063))
* **source/bigquery:** Restructure prebuilt toolsets
([#2637](#2637))
([dc984ba](dc984ba))
* **sources/bigquery:** Support custom oauth header name
([#2564](#2564))
([d3baf77](d3baf77))
* **source/cloudsql:** Restructure prebuilt toolsets
([#2635](#2635))
([99613dc](99613dc))
* **source/dataplex:** Restructure prebuilt toolsets
([#2640](#2640))
([acb9a80](acb9a80))
* **source/firestore:** Restructure prebuilt toolsets
([#2636](#2636))
([22ab7b9](22ab7b9))
* **source/oss-db:** Restructure prebuilt toolsets
([#2638](#2638))
([5196c6a](5196c6a))
* **source/spanner:** Restructure prebuilt toolsets
([#2641](#2641))
([ea2b698](ea2b698))
* Telemetry metrics updates as per semantic convention
([#2566](#2566))
([131d764](131d764))
* **tools/mongodb:** Add tool annotations to MongoDB tools for improved
LLM understanding
([#2219](#2219))
([b7a5f80](b7a5f80))
* **tools/serverless-spark:** Add get_session_template tool
([#2308](#2308))
([a136e16](a136e16))
* **tools/serverless-spark:** Add list/get sessions tools
([#2576](#2576))
([a554298](a554298))

### Bug Fixes

* Improve list locks integration test for postgres
([#2279](#2279))
([d9ebe5d](d9ebe5d))
* **mcp:** Guard nil SSE session lookup and return 400 for missing
session
([#2681](#2681))
([f66189f](f66189f))
* **oracle:** Update oracle-execute-sql tool interface to match source
signature
([#2627](#2627))
([81699a3](81699a3))
* Return AllParams for GetParameter() for tools with
templateParameter([#2734](#2734))
([bfd7ba6](bfd7ba6))
* **server/mcp:** Scope defer span.End inside loop iteration
([#2558](#2558))
([c88a62d](c88a62d)),
closes [#2549](#2549)
* **skill:** Fix env variable propagation
([#2645](#2645))
([5271368](5271368))
* **sources/looker:** Looker and looker-dev prebuilt tools should share
one source definition.
([#2620](#2620))
([df7f2fd](df7f2fd))
* **telemetry:** Histogram buckets from OTel standard to MCP standards
([#2729](#2729))
([87cd4a0](87cd4a0))
* **ui:** Remove module from script
([#2703](#2703))
([6943ab6](6943ab6))
* Update toolset attributes naming
([#2554](#2554))
([3d6ae4e](3d6ae4e))

---
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> 39832a0
github-actions bot pushed a commit to renovate-bot/googleapis-_-genai-toolbox that referenced this pull request Mar 13, 2026
🤖 I have created a release *beep* *boop*
---

##
[0.29.0](googleapis/mcp-toolbox@v0.28.0...v0.29.0)
(2026-03-13)

### ⚠ BREAKING CHANGES

* **source/alloydb:** restructure prebuilt toolsets
([googleapis#2639](googleapis#2639))
* **source/spanner:** restructure prebuilt toolsets
([googleapis#2641](googleapis#2641))
* **source/dataplex:** restructure prebuilt toolsets
([googleapis#2640](googleapis#2640))
* **source/oss-db:** restructure prebuilt toolsets
([googleapis#2638](googleapis#2638))
* **source/cloudsql:** restructure prebuilt toolsets
([googleapis#2635](googleapis#2635))
* **source/bigquery:** restructure prebuilt toolsets
([googleapis#2637](googleapis#2637))
* **source/firestore:** restructure prebuilt toolsets
([googleapis#2636](googleapis#2636))
* telemetry metrics updates as per semantic convention
([googleapis#2566](googleapis#2566))

### Features

* Add user agent to embeddings generation
([googleapis#2572](googleapis#2572))
([287251a](googleapis@287251a))
* **skill:** Attach user agent metadata for generated skill
([googleapis#2697](googleapis#2697))
([9598a6a](googleapis@9598a6a))
* **skills:** Add additional-notes flag to generate skills command
([googleapis#2696](googleapis#2696))
([73bf962](googleapis@73bf962))
* **skill:** Update skill generation logic
([googleapis#2646](googleapis#2646))
([c233eee](googleapis@c233eee))
* **source/alloydb:** Restructure prebuilt toolsets
([googleapis#2639](googleapis#2639))
([5f3f063](googleapis@5f3f063))
* **source/bigquery:** Restructure prebuilt toolsets
([googleapis#2637](googleapis#2637))
([dc984ba](googleapis@dc984ba))
* **sources/bigquery:** Support custom oauth header name
([googleapis#2564](googleapis#2564))
([d3baf77](googleapis@d3baf77))
* **source/cloudsql:** Restructure prebuilt toolsets
([googleapis#2635](googleapis#2635))
([99613dc](googleapis@99613dc))
* **source/dataplex:** Restructure prebuilt toolsets
([googleapis#2640](googleapis#2640))
([acb9a80](googleapis@acb9a80))
* **source/firestore:** Restructure prebuilt toolsets
([googleapis#2636](googleapis#2636))
([22ab7b9](googleapis@22ab7b9))
* **source/oss-db:** Restructure prebuilt toolsets
([googleapis#2638](googleapis#2638))
([5196c6a](googleapis@5196c6a))
* **source/spanner:** Restructure prebuilt toolsets
([googleapis#2641](googleapis#2641))
([ea2b698](googleapis@ea2b698))
* Telemetry metrics updates as per semantic convention
([googleapis#2566](googleapis#2566))
([131d764](googleapis@131d764))
* **tools/mongodb:** Add tool annotations to MongoDB tools for improved
LLM understanding
([googleapis#2219](googleapis#2219))
([b7a5f80](googleapis@b7a5f80))
* **tools/serverless-spark:** Add get_session_template tool
([googleapis#2308](googleapis#2308))
([a136e16](googleapis@a136e16))
* **tools/serverless-spark:** Add list/get sessions tools
([googleapis#2576](googleapis#2576))
([a554298](googleapis@a554298))

### Bug Fixes

* Improve list locks integration test for postgres
([googleapis#2279](googleapis#2279))
([d9ebe5d](googleapis@d9ebe5d))
* **mcp:** Guard nil SSE session lookup and return 400 for missing
session
([googleapis#2681](googleapis#2681))
([f66189f](googleapis@f66189f))
* **oracle:** Update oracle-execute-sql tool interface to match source
signature
([googleapis#2627](googleapis#2627))
([81699a3](googleapis@81699a3))
* Return AllParams for GetParameter() for tools with
templateParameter([googleapis#2734](googleapis#2734))
([bfd7ba6](googleapis@bfd7ba6))
* **server/mcp:** Scope defer span.End inside loop iteration
([googleapis#2558](googleapis#2558))
([c88a62d](googleapis@c88a62d)),
closes [googleapis#2549](googleapis#2549)
* **skill:** Fix env variable propagation
([googleapis#2645](googleapis#2645))
([5271368](googleapis@5271368))
* **sources/looker:** Looker and looker-dev prebuilt tools should share
one source definition.
([googleapis#2620](googleapis#2620))
([df7f2fd](googleapis@df7f2fd))
* **telemetry:** Histogram buckets from OTel standard to MCP standards
([googleapis#2729](googleapis#2729))
([87cd4a0](googleapis@87cd4a0))
* **ui:** Remove module from script
([googleapis#2703](googleapis#2703))
([6943ab6](googleapis@6943ab6))
* Update toolset attributes naming
([googleapis#2554](googleapis#2554))
([3d6ae4e](googleapis@3d6ae4e))

---
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> 39832a0
github-actions bot pushed a commit to Jaleel-zhu/genai-toolbox that referenced this pull request Mar 13, 2026
🤖 I have created a release *beep* *boop*
---

##
[0.29.0](googleapis/mcp-toolbox@v0.28.0...v0.29.0)
(2026-03-13)

### ⚠ BREAKING CHANGES

* **source/alloydb:** restructure prebuilt toolsets
([googleapis#2639](googleapis#2639))
* **source/spanner:** restructure prebuilt toolsets
([googleapis#2641](googleapis#2641))
* **source/dataplex:** restructure prebuilt toolsets
([googleapis#2640](googleapis#2640))
* **source/oss-db:** restructure prebuilt toolsets
([googleapis#2638](googleapis#2638))
* **source/cloudsql:** restructure prebuilt toolsets
([googleapis#2635](googleapis#2635))
* **source/bigquery:** restructure prebuilt toolsets
([googleapis#2637](googleapis#2637))
* **source/firestore:** restructure prebuilt toolsets
([googleapis#2636](googleapis#2636))
* telemetry metrics updates as per semantic convention
([googleapis#2566](googleapis#2566))

### Features

* Add user agent to embeddings generation
([googleapis#2572](googleapis#2572))
([287251a](googleapis@287251a))
* **skill:** Attach user agent metadata for generated skill
([googleapis#2697](googleapis#2697))
([9598a6a](googleapis@9598a6a))
* **skills:** Add additional-notes flag to generate skills command
([googleapis#2696](googleapis#2696))
([73bf962](googleapis@73bf962))
* **skill:** Update skill generation logic
([googleapis#2646](googleapis#2646))
([c233eee](googleapis@c233eee))
* **source/alloydb:** Restructure prebuilt toolsets
([googleapis#2639](googleapis#2639))
([5f3f063](googleapis@5f3f063))
* **source/bigquery:** Restructure prebuilt toolsets
([googleapis#2637](googleapis#2637))
([dc984ba](googleapis@dc984ba))
* **sources/bigquery:** Support custom oauth header name
([googleapis#2564](googleapis#2564))
([d3baf77](googleapis@d3baf77))
* **source/cloudsql:** Restructure prebuilt toolsets
([googleapis#2635](googleapis#2635))
([99613dc](googleapis@99613dc))
* **source/dataplex:** Restructure prebuilt toolsets
([googleapis#2640](googleapis#2640))
([acb9a80](googleapis@acb9a80))
* **source/firestore:** Restructure prebuilt toolsets
([googleapis#2636](googleapis#2636))
([22ab7b9](googleapis@22ab7b9))
* **source/oss-db:** Restructure prebuilt toolsets
([googleapis#2638](googleapis#2638))
([5196c6a](googleapis@5196c6a))
* **source/spanner:** Restructure prebuilt toolsets
([googleapis#2641](googleapis#2641))
([ea2b698](googleapis@ea2b698))
* Telemetry metrics updates as per semantic convention
([googleapis#2566](googleapis#2566))
([131d764](googleapis@131d764))
* **tools/mongodb:** Add tool annotations to MongoDB tools for improved
LLM understanding
([googleapis#2219](googleapis#2219))
([b7a5f80](googleapis@b7a5f80))
* **tools/serverless-spark:** Add get_session_template tool
([googleapis#2308](googleapis#2308))
([a136e16](googleapis@a136e16))
* **tools/serverless-spark:** Add list/get sessions tools
([googleapis#2576](googleapis#2576))
([a554298](googleapis@a554298))

### Bug Fixes

* Improve list locks integration test for postgres
([googleapis#2279](googleapis#2279))
([d9ebe5d](googleapis@d9ebe5d))
* **mcp:** Guard nil SSE session lookup and return 400 for missing
session
([googleapis#2681](googleapis#2681))
([f66189f](googleapis@f66189f))
* **oracle:** Update oracle-execute-sql tool interface to match source
signature
([googleapis#2627](googleapis#2627))
([81699a3](googleapis@81699a3))
* Return AllParams for GetParameter() for tools with
templateParameter([googleapis#2734](googleapis#2734))
([bfd7ba6](googleapis@bfd7ba6))
* **server/mcp:** Scope defer span.End inside loop iteration
([googleapis#2558](googleapis#2558))
([c88a62d](googleapis@c88a62d)),
closes [googleapis#2549](googleapis#2549)
* **skill:** Fix env variable propagation
([googleapis#2645](googleapis#2645))
([5271368](googleapis@5271368))
* **sources/looker:** Looker and looker-dev prebuilt tools should share
one source definition.
([googleapis#2620](googleapis#2620))
([df7f2fd](googleapis@df7f2fd))
* **telemetry:** Histogram buckets from OTel standard to MCP standards
([googleapis#2729](googleapis#2729))
([87cd4a0](googleapis@87cd4a0))
* **ui:** Remove module from script
([googleapis#2703](googleapis#2703))
([6943ab6](googleapis@6943ab6))
* Update toolset attributes naming
([googleapis#2554](googleapis#2554))
([3d6ae4e](googleapis@3d6ae4e))

---
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> 39832a0
bryankthompson pushed a commit to bryankthompson/genai-toolbox that referenced this pull request Mar 14, 2026
Add TestAnnotations() to each tool's test file to verify default and
custom annotation behavior, following the pattern from MongoDB PR googleapis#2219.

- 24 destructive tools: verify destructiveHint defaults to true, readOnlyHint to false
- 71 read-only tools: verify readOnlyHint defaults to true
- All tools: verify custom annotations override defaults
- Add helper function tests (NewReadOnlyAnnotations, NewDestructiveAnnotations,
  GetAnnotationsOrDefault) to tools_test.go
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.29.0](googleapis/mcp-toolbox@v0.28.0...v0.29.0)
(2026-03-13)


### ⚠ BREAKING CHANGES

* **source/alloydb:** restructure prebuilt toolsets
([#2639](googleapis/mcp-toolbox#2639))
* **source/spanner:** restructure prebuilt toolsets
([#2641](googleapis/mcp-toolbox#2641))
* **source/dataplex:** restructure prebuilt toolsets
([#2640](googleapis/mcp-toolbox#2640))
* **source/oss-db:** restructure prebuilt toolsets
([#2638](googleapis/mcp-toolbox#2638))
* **source/cloudsql:** restructure prebuilt toolsets
([#2635](googleapis/mcp-toolbox#2635))
* **source/bigquery:** restructure prebuilt toolsets
([#2637](googleapis/mcp-toolbox#2637))
* **source/firestore:** restructure prebuilt toolsets
([#2636](googleapis/mcp-toolbox#2636))
* telemetry metrics updates as per semantic convention
([#2566](googleapis/mcp-toolbox#2566))

### Features

* Add user agent to embeddings generation
([#2572](googleapis/mcp-toolbox#2572))
([287251a](googleapis/mcp-toolbox@287251a))
* **skill:** Attach user agent metadata for generated skill
([#2697](googleapis/mcp-toolbox#2697))
([9598a6a](googleapis/mcp-toolbox@9598a6a))
* **skills:** Add additional-notes flag to generate skills command
([#2696](googleapis/mcp-toolbox#2696))
([73bf962](googleapis/mcp-toolbox@73bf962))
* **skill:** Update skill generation logic
([#2646](googleapis/mcp-toolbox#2646))
([c233eee](googleapis/mcp-toolbox@c233eee))
* **source/alloydb:** Restructure prebuilt toolsets
([#2639](googleapis/mcp-toolbox#2639))
([5f3f063](googleapis/mcp-toolbox@5f3f063))
* **source/bigquery:** Restructure prebuilt toolsets
([#2637](googleapis/mcp-toolbox#2637))
([dc984ba](googleapis/mcp-toolbox@dc984ba))
* **sources/bigquery:** Support custom oauth header name
([#2564](googleapis/mcp-toolbox#2564))
([d3baf77](googleapis/mcp-toolbox@d3baf77))
* **source/cloudsql:** Restructure prebuilt toolsets
([#2635](googleapis/mcp-toolbox#2635))
([99613dc](googleapis/mcp-toolbox@99613dc))
* **source/dataplex:** Restructure prebuilt toolsets
([#2640](googleapis/mcp-toolbox#2640))
([acb9a80](googleapis/mcp-toolbox@acb9a80))
* **source/firestore:** Restructure prebuilt toolsets
([#2636](googleapis/mcp-toolbox#2636))
([22ab7b9](googleapis/mcp-toolbox@22ab7b9))
* **source/oss-db:** Restructure prebuilt toolsets
([#2638](googleapis/mcp-toolbox#2638))
([5196c6a](googleapis/mcp-toolbox@5196c6a))
* **source/spanner:** Restructure prebuilt toolsets
([#2641](googleapis/mcp-toolbox#2641))
([ea2b698](googleapis/mcp-toolbox@ea2b698))
* Telemetry metrics updates as per semantic convention
([#2566](googleapis/mcp-toolbox#2566))
([131d764](googleapis/mcp-toolbox@131d764))
* **tools/mongodb:** Add tool annotations to MongoDB tools for improved
LLM understanding
([#2219](googleapis/mcp-toolbox#2219))
([b7a5f80](googleapis/mcp-toolbox@b7a5f80))
* **tools/serverless-spark:** Add get_session_template tool
([#2308](googleapis/mcp-toolbox#2308))
([a136e16](googleapis/mcp-toolbox@a136e16))
* **tools/serverless-spark:** Add list/get sessions tools
([#2576](googleapis/mcp-toolbox#2576))
([a554298](googleapis/mcp-toolbox@a554298))


### Bug Fixes

* Improve list locks integration test for postgres
([#2279](googleapis/mcp-toolbox#2279))
([d9ebe5d](googleapis/mcp-toolbox@d9ebe5d))
* **mcp:** Guard nil SSE session lookup and return 400 for missing
session
([#2681](googleapis/mcp-toolbox#2681))
([f66189f](googleapis/mcp-toolbox@f66189f))
* **oracle:** Update oracle-execute-sql tool interface to match source
signature
([#2627](googleapis/mcp-toolbox#2627))
([81699a3](googleapis/mcp-toolbox@81699a3))
* Return AllParams for GetParameter() for tools with
templateParameter([#2734](googleapis/mcp-toolbox#2734))
([bfd7ba6](googleapis/mcp-toolbox@bfd7ba6))
* **server/mcp:** Scope defer span.End inside loop iteration
([#2558](googleapis/mcp-toolbox#2558))
([c88a62d](googleapis/mcp-toolbox@c88a62d)),
closes [#2549](googleapis/mcp-toolbox#2549)
* **skill:** Fix env variable propagation
([#2645](googleapis/mcp-toolbox#2645))
([5271368](googleapis/mcp-toolbox@5271368))
* **sources/looker:** Looker and looker-dev prebuilt tools should share
one source definition.
([#2620](googleapis/mcp-toolbox#2620))
([df7f2fd](googleapis/mcp-toolbox@df7f2fd))
* **telemetry:** Histogram buckets from OTel standard to MCP standards
([#2729](googleapis/mcp-toolbox#2729))
([87cd4a0](googleapis/mcp-toolbox@87cd4a0))
* **ui:** Remove module from script
([#2703](googleapis/mcp-toolbox#2703))
([6943ab6](googleapis/mcp-toolbox@6943ab6))
* Update toolset attributes naming
([#2554](googleapis/mcp-toolbox#2554))
([3d6ae4e](googleapis/mcp-toolbox@3d6ae4e))

---
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>
NirajNandre pushed a commit to NirajNandre/genai-toolbox-fork that referenced this pull request Mar 24, 2026
…nding (googleapis#2219)

## Summary

Adds MCP tool annotations (`readOnlyHint`, `destructiveHint`) to all 9
MongoDB tools to help LLMs better understand tool behavior and make
safer decisions.

## Changes

| Tool | Annotation |
|------|------------|
| mongodb-find | `readOnlyHint: true` |
| mongodb-find-one | `readOnlyHint: true` |
| mongodb-aggregate | `readOnlyHint: true` |
| mongodb-insert-one | `destructiveHint: true` |
| mongodb-insert-many | `destructiveHint: true` |
| mongodb-update-one | `destructiveHint: true` |
| mongodb-update-many | `destructiveHint: true` |
| mongodb-delete-one | `destructiveHint: true` |
| mongodb-delete-many | `destructiveHint: true` |

## Implementation

Each tool now:
1. Has an `Annotations` field in its Config struct for YAML
configurability
2. Provides default annotations if not explicitly configured
3. Passes annotations to `GetMcpManifest()` instead of `nil`

This follows the exact pattern established by the Looker tools (e.g.,
`lookergetconnectionschemas`, `lookerupdateprojectfile`).

## Why This Matters

- **Semantic metadata**: Annotations provide information beyond just the
tool description
- **Safety signals**: `readOnlyHint` tells LLMs a tool is safe to call
without side effects
- **Destructive awareness**: `destructiveHint` signals LLMs should be
more careful before executing
- **Better tool selection**: LLMs can prioritize read-only tools for
information gathering
- **MCP compliance**: Follows the [MCP tool annotations
specification](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations)

## Testing

- [ ] CI builds successfully
- [ ] `tools/list` returns annotations in MCP response

## Files Changed

- `internal/tools/mongodb/mongodbfind/mongodbfind.go`
- `internal/tools/mongodb/mongodbfindone/mongodbfindone.go`
- `internal/tools/mongodb/mongodbaggregate/mongodbaggregate.go`
- `internal/tools/mongodb/mongodbinsertone/mongodbinsertone.go`
- `internal/tools/mongodb/mongodbinsertmany/mongodbinsertmany.go`
- `internal/tools/mongodb/mongodbupdateone/mongodbupdateone.go`
- `internal/tools/mongodb/mongodbupdatemany/mongodbupdatemany.go`
- `internal/tools/mongodb/mongodbdeleteone/mongodbdeleteone.go`
- `internal/tools/mongodb/mongodbdeletemany/mongodbdeletemany.go`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: triepod-ai <199543909+triepod-ai@users.noreply.github.com>
Co-authored-by: bryankthompson <199543909+bryankthompson@users.noreply.github.com>
Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com>
NirajNandre pushed a commit to NirajNandre/genai-toolbox-fork that referenced this pull request Mar 24, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.29.0](googleapis/mcp-toolbox@v0.28.0...v0.29.0)
(2026-03-13)


### ⚠ BREAKING CHANGES

* **source/alloydb:** restructure prebuilt toolsets
([googleapis#2639](googleapis#2639))
* **source/spanner:** restructure prebuilt toolsets
([googleapis#2641](googleapis#2641))
* **source/dataplex:** restructure prebuilt toolsets
([googleapis#2640](googleapis#2640))
* **source/oss-db:** restructure prebuilt toolsets
([googleapis#2638](googleapis#2638))
* **source/cloudsql:** restructure prebuilt toolsets
([googleapis#2635](googleapis#2635))
* **source/bigquery:** restructure prebuilt toolsets
([googleapis#2637](googleapis#2637))
* **source/firestore:** restructure prebuilt toolsets
([googleapis#2636](googleapis#2636))
* telemetry metrics updates as per semantic convention
([googleapis#2566](googleapis#2566))

### Features

* Add user agent to embeddings generation
([googleapis#2572](googleapis#2572))
([287251a](googleapis@287251a))
* **skill:** Attach user agent metadata for generated skill
([googleapis#2697](googleapis#2697))
([9598a6a](googleapis@9598a6a))
* **skills:** Add additional-notes flag to generate skills command
([googleapis#2696](googleapis#2696))
([73bf962](googleapis@73bf962))
* **skill:** Update skill generation logic
([googleapis#2646](googleapis#2646))
([c233eee](googleapis@c233eee))
* **source/alloydb:** Restructure prebuilt toolsets
([googleapis#2639](googleapis#2639))
([5f3f063](googleapis@5f3f063))
* **source/bigquery:** Restructure prebuilt toolsets
([googleapis#2637](googleapis#2637))
([dc984ba](googleapis@dc984ba))
* **sources/bigquery:** Support custom oauth header name
([googleapis#2564](googleapis#2564))
([d3baf77](googleapis@d3baf77))
* **source/cloudsql:** Restructure prebuilt toolsets
([googleapis#2635](googleapis#2635))
([99613dc](googleapis@99613dc))
* **source/dataplex:** Restructure prebuilt toolsets
([googleapis#2640](googleapis#2640))
([acb9a80](googleapis@acb9a80))
* **source/firestore:** Restructure prebuilt toolsets
([googleapis#2636](googleapis#2636))
([22ab7b9](googleapis@22ab7b9))
* **source/oss-db:** Restructure prebuilt toolsets
([googleapis#2638](googleapis#2638))
([5196c6a](googleapis@5196c6a))
* **source/spanner:** Restructure prebuilt toolsets
([googleapis#2641](googleapis#2641))
([ea2b698](googleapis@ea2b698))
* Telemetry metrics updates as per semantic convention
([googleapis#2566](googleapis#2566))
([131d764](googleapis@131d764))
* **tools/mongodb:** Add tool annotations to MongoDB tools for improved
LLM understanding
([googleapis#2219](googleapis#2219))
([b7a5f80](googleapis@b7a5f80))
* **tools/serverless-spark:** Add get_session_template tool
([googleapis#2308](googleapis#2308))
([a136e16](googleapis@a136e16))
* **tools/serverless-spark:** Add list/get sessions tools
([googleapis#2576](googleapis#2576))
([a554298](googleapis@a554298))


### Bug Fixes

* Improve list locks integration test for postgres
([googleapis#2279](googleapis#2279))
([d9ebe5d](googleapis@d9ebe5d))
* **mcp:** Guard nil SSE session lookup and return 400 for missing
session
([googleapis#2681](googleapis#2681))
([f66189f](googleapis@f66189f))
* **oracle:** Update oracle-execute-sql tool interface to match source
signature
([googleapis#2627](googleapis#2627))
([81699a3](googleapis@81699a3))
* Return AllParams for GetParameter() for tools with
templateParameter([googleapis#2734](googleapis#2734))
([bfd7ba6](googleapis@bfd7ba6))
* **server/mcp:** Scope defer span.End inside loop iteration
([googleapis#2558](googleapis#2558))
([c88a62d](googleapis@c88a62d)),
closes [googleapis#2549](googleapis#2549)
* **skill:** Fix env variable propagation
([googleapis#2645](googleapis#2645))
([5271368](googleapis@5271368))
* **sources/looker:** Looker and looker-dev prebuilt tools should share
one source definition.
([googleapis#2620](googleapis#2620))
([df7f2fd](googleapis@df7f2fd))
* **telemetry:** Histogram buckets from OTel standard to MCP standards
([googleapis#2729](googleapis#2729))
([87cd4a0](googleapis@87cd4a0))
* **ui:** Remove module from script
([googleapis#2703](googleapis#2703))
([6943ab6](googleapis@6943ab6))
* Update toolset attributes naming
([googleapis#2554](googleapis#2554))
([3d6ae4e](googleapis@3d6ae4e))

---
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>
duwenxin99 added a commit that referenced this pull request Apr 6, 2026
## Summary

Adds MCP tool annotations (`readOnlyHint`, `destructiveHint`) to all
remaining tools (excluding Looker and MongoDB which already have
annotations from #2219).

## Changes

- Added `Annotations *tools.ToolAnnotations` field to Config structs for
YAML configuration override
- Added `readOnlyHint: true` to 92 read-only tools (queries, fetches,
lists, gets, searches)
- Added `destructiveHint: true` to 50 tools that modify data (execute
SQL, create, delete, update)
- Used `GetAnnotationsOrDefault` pattern for user-overridable defaults
- Applied to 156 tool files across all database and service tools

## Why This Matters

Tool annotations provide semantic metadata that helps MCP clients:
- Auto-approve safe (read-only) operations without user confirmation
- Show appropriate warnings for destructive operations
- Cache results of read-only tools more aggressively

## Classification Approach

- **Read-only**: Tools that only query/fetch data (list, get, search,
schema, stats)
- **Destructive**: Tools that can modify data (execute SQL, create,
update, delete)
- General SQL execution tools marked destructive (can run arbitrary DML)
- Wait/poll and compile/validate tools are read-only

## Testing

- [x] `go build ./...` passes
- [x] `go test ./internal/tools/...` - all tests pass
- [x] `golangci-lint run --fix` - 0 issues
- [x] Annotation values match actual tool behavior

## CLA Fix

This push resolves the CLA check failure. Commit now authored with
correct GitHub noreply email.

Co-authored-by: bryankthompson <199543909+bryankthompson@users.noreply.github.com>
Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com>
github-actions bot pushed a commit to pepe57/genai-toolbox that referenced this pull request Apr 7, 2026
…apis#2221)

## Summary

Adds MCP tool annotations (`readOnlyHint`, `destructiveHint`) to all
remaining tools (excluding Looker and MongoDB which already have
annotations from googleapis#2219).

## Changes

- Added `Annotations *tools.ToolAnnotations` field to Config structs for
YAML configuration override
- Added `readOnlyHint: true` to 92 read-only tools (queries, fetches,
lists, gets, searches)
- Added `destructiveHint: true` to 50 tools that modify data (execute
SQL, create, delete, update)
- Used `GetAnnotationsOrDefault` pattern for user-overridable defaults
- Applied to 156 tool files across all database and service tools

## Why This Matters

Tool annotations provide semantic metadata that helps MCP clients:
- Auto-approve safe (read-only) operations without user confirmation
- Show appropriate warnings for destructive operations
- Cache results of read-only tools more aggressively

## Classification Approach

- **Read-only**: Tools that only query/fetch data (list, get, search,
schema, stats)
- **Destructive**: Tools that can modify data (execute SQL, create,
update, delete)
- General SQL execution tools marked destructive (can run arbitrary DML)
- Wait/poll and compile/validate tools are read-only

## Testing

- [x] `go build ./...` passes
- [x] `go test ./internal/tools/...` - all tests pass
- [x] `golangci-lint run --fix` - 0 issues
- [x] Annotation values match actual tool behavior

## CLA Fix

This push resolves the CLA check failure. Commit now authored with
correct GitHub noreply email.

Co-authored-by: bryankthompson <199543909+bryankthompson@users.noreply.github.com>
Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com> ea09db9
github-actions bot pushed a commit to Jaleel-zhu/genai-toolbox that referenced this pull request Apr 7, 2026
…apis#2221)

## Summary

Adds MCP tool annotations (`readOnlyHint`, `destructiveHint`) to all
remaining tools (excluding Looker and MongoDB which already have
annotations from googleapis#2219).

## Changes

- Added `Annotations *tools.ToolAnnotations` field to Config structs for
YAML configuration override
- Added `readOnlyHint: true` to 92 read-only tools (queries, fetches,
lists, gets, searches)
- Added `destructiveHint: true` to 50 tools that modify data (execute
SQL, create, delete, update)
- Used `GetAnnotationsOrDefault` pattern for user-overridable defaults
- Applied to 156 tool files across all database and service tools

## Why This Matters

Tool annotations provide semantic metadata that helps MCP clients:
- Auto-approve safe (read-only) operations without user confirmation
- Show appropriate warnings for destructive operations
- Cache results of read-only tools more aggressively

## Classification Approach

- **Read-only**: Tools that only query/fetch data (list, get, search,
schema, stats)
- **Destructive**: Tools that can modify data (execute SQL, create,
update, delete)
- General SQL execution tools marked destructive (can run arbitrary DML)
- Wait/poll and compile/validate tools are read-only

## Testing

- [x] `go build ./...` passes
- [x] `go test ./internal/tools/...` - all tests pass
- [x] `golangci-lint run --fix` - 0 issues
- [x] Annotation values match actual tool behavior

## CLA Fix

This push resolves the CLA check failure. Commit now authored with
correct GitHub noreply email.

Co-authored-by: bryankthompson <199543909+bryankthompson@users.noreply.github.com>
Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com> ea09db9
github-actions bot pushed a commit to CrazyForks/genai-toolbox that referenced this pull request Apr 7, 2026
…apis#2221)

## Summary

Adds MCP tool annotations (`readOnlyHint`, `destructiveHint`) to all
remaining tools (excluding Looker and MongoDB which already have
annotations from googleapis#2219).

## Changes

- Added `Annotations *tools.ToolAnnotations` field to Config structs for
YAML configuration override
- Added `readOnlyHint: true` to 92 read-only tools (queries, fetches,
lists, gets, searches)
- Added `destructiveHint: true` to 50 tools that modify data (execute
SQL, create, delete, update)
- Used `GetAnnotationsOrDefault` pattern for user-overridable defaults
- Applied to 156 tool files across all database and service tools

## Why This Matters

Tool annotations provide semantic metadata that helps MCP clients:
- Auto-approve safe (read-only) operations without user confirmation
- Show appropriate warnings for destructive operations
- Cache results of read-only tools more aggressively

## Classification Approach

- **Read-only**: Tools that only query/fetch data (list, get, search,
schema, stats)
- **Destructive**: Tools that can modify data (execute SQL, create,
update, delete)
- General SQL execution tools marked destructive (can run arbitrary DML)
- Wait/poll and compile/validate tools are read-only

## Testing

- [x] `go build ./...` passes
- [x] `go test ./internal/tools/...` - all tests pass
- [x] `golangci-lint run --fix` - 0 issues
- [x] Annotation values match actual tool behavior

## CLA Fix

This push resolves the CLA check failure. Commit now authored with
correct GitHub noreply email.

Co-authored-by: bryankthompson <199543909+bryankthompson@users.noreply.github.com>
Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com> ea09db9
github-actions bot pushed a commit to bhardwajRahul/genai-toolbox that referenced this pull request Apr 7, 2026
…apis#2221)

## Summary

Adds MCP tool annotations (`readOnlyHint`, `destructiveHint`) to all
remaining tools (excluding Looker and MongoDB which already have
annotations from googleapis#2219).

## Changes

- Added `Annotations *tools.ToolAnnotations` field to Config structs for
YAML configuration override
- Added `readOnlyHint: true` to 92 read-only tools (queries, fetches,
lists, gets, searches)
- Added `destructiveHint: true` to 50 tools that modify data (execute
SQL, create, delete, update)
- Used `GetAnnotationsOrDefault` pattern for user-overridable defaults
- Applied to 156 tool files across all database and service tools

## Why This Matters

Tool annotations provide semantic metadata that helps MCP clients:
- Auto-approve safe (read-only) operations without user confirmation
- Show appropriate warnings for destructive operations
- Cache results of read-only tools more aggressively

## Classification Approach

- **Read-only**: Tools that only query/fetch data (list, get, search,
schema, stats)
- **Destructive**: Tools that can modify data (execute SQL, create,
update, delete)
- General SQL execution tools marked destructive (can run arbitrary DML)
- Wait/poll and compile/validate tools are read-only

## Testing

- [x] `go build ./...` passes
- [x] `go test ./internal/tools/...` - all tests pass
- [x] `golangci-lint run --fix` - 0 issues
- [x] Annotation values match actual tool behavior

## CLA Fix

This push resolves the CLA check failure. Commit now authored with
correct GitHub noreply email.

Co-authored-by: bryankthompson <199543909+bryankthompson@users.noreply.github.com>
Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com> ea09db9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p2 Moderately-important priority. Fix may not be included in next release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants