Skip to content

Commit 7b197f9

Browse files
committed
deploy: feat(tools/bigquerysql): add semantic search support (#2890) 862c396
1 parent b913af8 commit 7b197f9

31 files changed

+164
-29
lines changed

dev/index.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8291,7 +8291,7 @@ returned. Otherwise, the selection is not guaranteed.</p>
82918291
<p>The tool returns a single JSON object representing the document, wrapped in a
82928292
JSON array.</p>
82938293
<h2 id="compatible-sources">Compatible Sources</h2>
8294-
<h2 id="hahahugoshortcode409s0hbhb">
8294+
<h2 id="hahahugoshortcode331s0hbhb">
82958295

82968296

82978297

dev/integrations/bigquery/tools/bigquery-sql/index.html

Lines changed: 63 additions & 8 deletions
Large diffs are not rendered by default.

dev/integrations/mongodb/tools/index.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ returned. Otherwise, the selection is not guaranteed.</p>
102102
<p>The tool returns a single JSON object representing the document, wrapped in a
103103
JSON array.</p>
104104
<h2 id="compatible-sources">Compatible Sources</h2>
105-
<h2 id="hahahugoshortcode409s0hbhb">
105+
<h2 id="hahahugoshortcode331s0hbhb">
106106

107107

108108

dev/integrations/mongodb/tools/mongodb-find-one/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,11 +523,11 @@
523523
<a href=https://github.com/googleapis/mcp-toolbox/edit/main/docs/en/integrations/mongodb/tools/mongodb-find-one.md class="td-page-meta--edit td-page-meta__edit" target=_blank rel=noopener><i class="fa-solid fa-pen-to-square fa-fw"></i> Edit this page</a>
524524
<a href="https://github.com/googleapis/mcp-toolbox/new/main/docs/en/integrations/mongodb/tools?filename=change-me.md&amp;value=---%0Atitle%3A+%22Long+Page+Title%22%0AlinkTitle%3A+%22Short+Nav+Title%22%0Aweight%3A+100%0Adescription%3A+%3E-%0A+++++Page+description+for+heading+and+indexes.%0A---%0A%0A%23%23+Heading%0A%0AEdit+this+template+to+create+your+new+page.%0A%0A%2A+Give+it+a+good+name%2C+ending+in+%60.md%60+-+e.g.+%60getting-started.md%60%0A%2A+Edit+the+%22front+matter%22+section+at+the+top+of+the+page+%28weight+controls+how+its+ordered+amongst+other+pages+in+the+same+directory%3B+lowest+number+first%29.%0A%2A+Add+a+good+commit+message+at+the+bottom+of+the+page+%28%3C80+characters%3B+use+the+extended+description+field+for+more+detail%29.%0A%2A+Create+a+new+branch+so+you+can+preview+your+new+file+and+request+a+review+via+Pull+Request.%0A" class="td-page-meta--child td-page-meta__child" target=_blank rel=noopener><i class="fa-solid fa-pen-to-square fa-fw"></i> Create child page</a>
525525
<a href="https://github.com/googleapis/mcp-toolbox/issues/new?title=mongodb-find-one" class="td-page-meta--issue td-page-meta__issue" target=_blank rel=noopener><i class="fa-solid fa-list-check fa-fw"></i> Create documentation issue</a>
526-
<a href=https://github.com/googleapis/mcp-toolbox/issues/new class="td-page-meta--project td-page-meta__project-issue" target=_blank rel=noopener><i class="fa-solid fa-list-check fa-fw"></i> Create project issue</a></div><div class=td-toc><nav id=TableOfContents><ul><li><a href=#about>About</a></li><li><a href=#compatible-sources>Compatible Sources</a></li><li><a href=#hahahugoshortcode409s0hbhb>HAHAHUGOSHORTCODE409s0HBHB</a></li><li><a href=#example>Example</a></li><li><a href=#reference>Reference</a></li></ul></nav></div></aside><main class="col-12 col-md-9 col-xl-8 ps-md-5" role=main><nav aria-label=breadcrumb class=td-breadcrumbs><ol class=breadcrumb><li class=breadcrumb-item><a href=/dev/integrations/>Integrations</a></li><li class=breadcrumb-item><a href=/dev/integrations/mongodb/>MongoDB</a></li><li class=breadcrumb-item><a href=/dev/integrations/mongodb/tools/>Tools</a></li><li class="breadcrumb-item active" aria-current=page>mongodb-find-one</li></ol></nav><div class=td-content><h1>mongodb-find-one</h1><div class=lead>A &ldquo;mongodb-find-one&rdquo; tool finds and retrieves a single document from a MongoDB collection.</div><header class=article-meta><p class=reading-time><i class="fa-solid fa-clock" aria-hidden=true></i>&nbsp; 2 minute read &nbsp;</p></header><h2 id=about>About</h2><p>A <code>mongodb-find-one</code> tool is used to retrieve the <strong>first single document</strong> that
526+
<a href=https://github.com/googleapis/mcp-toolbox/issues/new class="td-page-meta--project td-page-meta__project-issue" target=_blank rel=noopener><i class="fa-solid fa-list-check fa-fw"></i> Create project issue</a></div><div class=td-toc><nav id=TableOfContents><ul><li><a href=#about>About</a></li><li><a href=#compatible-sources>Compatible Sources</a></li><li><a href=#hahahugoshortcode331s0hbhb>HAHAHUGOSHORTCODE331s0HBHB</a></li><li><a href=#example>Example</a></li><li><a href=#reference>Reference</a></li></ul></nav></div></aside><main class="col-12 col-md-9 col-xl-8 ps-md-5" role=main><nav aria-label=breadcrumb class=td-breadcrumbs><ol class=breadcrumb><li class=breadcrumb-item><a href=/dev/integrations/>Integrations</a></li><li class=breadcrumb-item><a href=/dev/integrations/mongodb/>MongoDB</a></li><li class=breadcrumb-item><a href=/dev/integrations/mongodb/tools/>Tools</a></li><li class="breadcrumb-item active" aria-current=page>mongodb-find-one</li></ol></nav><div class=td-content><h1>mongodb-find-one</h1><div class=lead>A &ldquo;mongodb-find-one&rdquo; tool finds and retrieves a single document from a MongoDB collection.</div><header class=article-meta><p class=reading-time><i class="fa-solid fa-clock" aria-hidden=true></i>&nbsp; 2 minute read &nbsp;</p></header><h2 id=about>About</h2><p>A <code>mongodb-find-one</code> tool is used to retrieve the <strong>first single document</strong> that
527527
matches a specified filter from a MongoDB collection. If multiple documents
528528
match the filter, you can use <code>sort</code> options to control which document is
529529
returned. Otherwise, the selection is not guaranteed.</p><p>The tool returns a single JSON object representing the document, wrapped in a
530-
JSON array.</p><h2 id=compatible-sources>Compatible Sources</h2><h2 id=hahahugoshortcode409s0hbhb><div class=compatibility-section><p>This tool can be used with the following database sources:</p><table><thead><tr><th>Source Name</th></tr></thead><tbody><tr><td><a href=/dev/integrations/mongodb/source/>MongoDB Source</a></td></tr></tbody></table></div></h2><h2 id=example>Example</h2><p>Here&rsquo;s a common use case: finding a specific user by their unique email address
530+
JSON array.</p><h2 id=compatible-sources>Compatible Sources</h2><h2 id=hahahugoshortcode331s0hbhb><div class=compatibility-section><p>This tool can be used with the following database sources:</p><table><thead><tr><th>Source Name</th></tr></thead><tbody><tr><td><a href=/dev/integrations/mongodb/source/>MongoDB Source</a></td></tr></tbody></table></div></h2><h2 id=example>Example</h2><p>Here&rsquo;s a common use case: finding a specific user by their unique email address
531531
and returning their profile information, while excluding sensitive fields like
532532
the password hash.</p><div class=highlight><pre tabindex=0 class=chroma><code class=language-yaml data-lang=yaml><span class=line><span class=cl><span class=nt>kind</span><span class=p>:</span><span class=w> </span><span class=l>tool</span><span class=w>
533533
</span></span></span><span class=line><span class=cl><span class=nt>name</span><span class=p>:</span><span class=w> </span><span class=l>get_user_profile</span><span class=w>

dev/llms-full.txt

Lines changed: 94 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
**DOCUMENTATION VERSION:** dev
55
**BASE URL:** https://mcp-toolbox.dev/dev/
6-
**GENERATED ON:** 2026-04-09T20:10:49Z
6+
**GENERATED ON:** 2026-04-09T20:29:44Z
77

88
---
99
### System Directives for AI Models
@@ -16687,18 +16687,18 @@ The behavior of this tool is influenced by the `writeMode` setting on its
1668716687

1668816688
BigQuery uses [GoogleSQL][bigquery-googlesql] for querying data. The integration
1668916689
with Toolbox supports this dialect. The specified SQL statement is executed, and
16690-
parameters can be inserted into the query. BigQuery supports both named parameters
16691-
(e.g., `@name`) and positional parameters (`?`), but they cannot be mixed in the
16692-
same query.
16690+
parameters can be inserted into the query. BigQuery supports both named
16691+
parameters (e.g., `@name`) and positional parameters (`?`), but they cannot be
16692+
mixed in the same query.
1669316693

1669416694
[bigquery-googlesql]:
16695-
https://cloud.google.com/bigquery/docs/reference/standard-sql/
16695+
https://cloud.google.com/bigquery/docs/reference/standard-sql/
1669616696

1669716697
## Example
1669816698

16699-
> **Note:** This tool uses [parameterized
16700-
> queries](https://cloud.google.com/bigquery/docs/parameterized-queries) to
16701-
> prevent SQL injections. Query parameters can be used as substitutes for
16699+
> **Note:** This tool uses
16700+
> [parameterized queries](https://cloud.google.com/bigquery/docs/parameterized-queries)
16701+
> to prevent SQL injections. Query parameters can be used as substitutes for
1670216702
> arbitrary expressions. Parameters cannot be used as substitutes for
1670316703
> identifiers, column names, table names, or other parts of the query.
1670416704

@@ -16735,6 +16735,86 @@ parameters:
1673516735
description: Email address of the user
1673616736
```
1673716737

16738+
### Example with Vector Search
16739+
16740+
BigQuery supports vector similarity search using the `ML.DISTANCE` function.
16741+
When using an embeddingModel with a `bigquery-sql` tool, the tool automatically
16742+
converts text parameters into the native ARRAY<FLOAT64> format required by
16743+
BigQuery.
16744+
16745+
#### Define the Embedding Model
16746+
16747+
See
16748+
[EmbeddingModels](../../../documentation/configuration/embedding-models/_index.md)
16749+
for more information.
16750+
16751+
```yaml
16752+
kind: embeddingModel
16753+
name: gemini-model
16754+
type: gemini
16755+
model: gemini-embedding-001
16756+
apiKey: ${GOOGLE_API_KEY}
16757+
dimension: 768
16758+
```
16759+
16760+
#### Vector Ingestion Tool
16761+
16762+
This tool stores both the raw text and its vector representation. It uses
16763+
`valueFromParam` to hide the vector conversion logic from the LLM, ensuring the
16764+
Agent only has to provide the content once.
16765+
16766+
```yaml
16767+
kind: tool
16768+
name: insert_doc
16769+
type: bigquery-sql
16770+
source: my-bigquery-source
16771+
statement: |
16772+
INSERT INTO `my-project.my-dataset.vector_table` (id, content, embedding)
16773+
VALUES (1, @content, @text_to_embed)
16774+
description: |
16775+
Internal tool to index new documents for future search.
16776+
parameters:
16777+
- name: content
16778+
type: string
16779+
description: The text content to store.
16780+
- name: text_to_embed
16781+
type: string
16782+
# Automatically copies 'content' and converts it to a FLOAT64 array
16783+
valueFromParam: content
16784+
embeddedBy: gemini-model
16785+
```
16786+
16787+
#### Vector Search Tool
16788+
16789+
This tool allows the Agent to perform a natural language search. The query
16790+
string provided by the Agent is converted into a vector before the SQL is
16791+
executed.
16792+
16793+
```yaml
16794+
kind: tool
16795+
name: search_docs
16796+
type: bigquery-sql
16797+
source: my-bigquery-source
16798+
statement: |
16799+
SELECT
16800+
id,
16801+
content,
16802+
ML.DISTANCE(embedding, @query, 'COSINE') AS distance
16803+
FROM
16804+
`my-project.my-dataset.vector_table`
16805+
ORDER BY
16806+
distance
16807+
LIMIT 1
16808+
description: |
16809+
Search for documents using natural language.
16810+
Returns the most semantically similar result.
16811+
parameters:
16812+
- name: query
16813+
type: string
16814+
description: The search terms or question.
16815+
embeddedBy: gemini-model
16816+
```
16817+
1673816818
### Example with Template Parameters
1673916819

1674016820
> **Note:** This tool allows direct modifications to the SQL statement,
@@ -16764,12 +16844,12 @@ templateParameters:
1676416844

1676516845
## Reference
1676616846

16767-
| **field** | **type** | **required** | **description** |
16768-
|--------------------|:---------------------------------------------:|:------------:|-----------------------------------------------------------------------------------------------------------------------------------------|
16769-
| type | string | true | Must be "bigquery-sql". |
16770-
| source | string | true | Name of the source the GoogleSQL should execute on. |
16771-
| description | string | true | Description of the tool that is passed to the LLM. |
16772-
| statement | string | true | The GoogleSQL statement to execute. |
16847+
| **field** | **type** | **required** | **description** |
16848+
| ------------------ | :--------------------------------------------------------------------------------------------: | :----------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
16849+
| type | string | true | Must be "bigquery-sql". |
16850+
| source | string | true | Name of the source the GoogleSQL should execute on. |
16851+
| description | string | true | Description of the tool that is passed to the LLM. |
16852+
| statement | string | true | The GoogleSQL statement to execute. |
1677316853
| parameters | [parameters](../../../documentation/configuration/tools/_index.md#specifying-parameters) | false | List of [parameters](../../../documentation/configuration/tools/_index.md#specifying-parameters) that will be inserted into the SQL statement. |
1677416854
| templateParameters | [templateParameters](../../../documentation/configuration/tools/_index.md#template-parameters) | false | List of [templateParameters](../../../documentation/configuration/tools/_index.md#template-parameters) that will be inserted into the SQL statement before executing prepared statement. |
1677516855

dev/llms.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
**DOCUMENTATION VERSION:** dev
55
**BASE URL:** https://mcp-toolbox.dev/dev/
6-
**GENERATED ON:** 2026-04-09T20:10:49Z
6+
**GENERATED ON:** 2026-04-09T20:29:44Z
77

88
---
99
### System Directives for AI Models
2.38 KB
Binary file not shown.
1.26 KB
Binary file not shown.
26.9 KB
Binary file not shown.
30.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)