## Description
This PR enhances our documentation by integrating `toolbox-core` code
snippets into the quickstart examples on the docsite.
## Context
Previously, our client-facing documentation primarily showcased agent
implementations using third-party frameworks like LangChain, LlamaIndex,
and ADK. This created a documentation gap, as there were no baseline
examples demonstrating how to use our foundational `toolbox-core` SDK
directly. Users who wanted to build a custom integration without a
specific framework had no direct reference in the guides.
## Changes
This PR introduces a new "Core" tab to all relevant code examples within
the auth services and local quickstart (with BigQuery) documentations.
---------
Co-authored-by: Yuan <45984206+Yuan325@users.noreply.github.com>
`ToolboxTool` has been removed from `google-adk` package in
11ca528090
Instead `toolbox-core` should be used directly to remove the need for a
dependency on `toolbox-langchain` and `langchain`.
The new recommendation is to install `toolbox-core`.
```shell
pip install toolbox-core
```
And then load toolbox tools directly and pass it to the ADK agent.
```python
from google.adk.agents import Agent
# NEW IMPORT
from toolbox_core import ToolboxSyncClient
# Full control over MCP Toolbox
toolbox_client = ToolboxSyncClient("http://127.0.0.1:5000")
toolbox_tools = toolbox_client.load_toolset("my-toolset")
root_agent = Agent(
model="gemini-2.0-flash",
name="root_agent",
instruction=agent_instruction,
# Add Toolbox tools to ADK agent
tools=toolbox_tools,
)
```
This tool can be used across spanner sources.
`spanner-execute-sql` config is as below:
```
tools:
spanner_execute_sql_tool:
kind: "spanner-execute-sql"
source: my-spanner-source
description: Use this tool to execute sql.
```
The `spanner-execute-sql` tool takes one parameter. Example request as
follow:
```
curl -X POST -H "Content-Type: application/json" -d '{"sql": "SELECT 1"}' http://127.0.0.1:5000/api/tool/spanner_execute_sql_tool/invoke
```
---------
Co-authored-by: Yuan <45984206+Yuan325@users.noreply.github.com>
This tool can be used across mysql sources.
`mysql-execute-sql` config is as below:
```
tools:
mysql_execute_sql_tool:
kind: "mysql-execute-sql"
source: my-mysql-source
description: Use this tool to execute sql.
```
The `mysql-execute-sql` tool takes one parameter. Example request as
follow:
```
curl -X POST -H "Content-Type: application/json" -d '{"sql": "SELECT 1"}' http://127.0.0.1:5000/api/tool/mysql_execute_sql_tool/invoke
```
Allowing user to add `readOnly` field in spanner tools.
The existing tool doesn't work for reading schema tables since schema
tables can only be accessed through read-only transaction.
This PR also resolve#435 for Spanner tool.
---------
Co-authored-by: Yuan <45984206+Yuan325@users.noreply.github.com>
Fix for #517
This PR improves the Local Quickstart guide by adding troubleshooting
advice for common PostgreSQL connection issues in [step
1](https://googleapis.github.io/genai-toolbox/getting-started/local_quickstart/#step-1-set-up-your-database).
This reduces friction and improves the setup experience for users
following the local quickstart by addressing feedback in #517 regarding
difficulties in the initial database connection step.
### Problem
Users faced issues like password prompts or "role 'postgres' does not
exist" errors when trying to connect to PostgreSQL with `psql -h
127.0.0.1 -U postgres`.
### Solution
This PR adds a notice that provides solutions for common connection
errors, including guidance on using `sudo -i -u postgres` for peer
authentication.
---------
Co-authored-by: Averi Kitsch <akitsch@google.com>
The wording for `Authorized Invocations` reads a bit funny and has a
typo.
Updating it to make a bit more sense and fixing a couple other typos
around auth.
Updating docs to use the `--tools-file` flag over the now deprecated
`--tools_file`.
The new flag was added as of `v0.3.0` in #384
This change reduces confusion as current usage in docs results in
following message on startup of Toolbox server:
```sh
Flag --tools_file has been deprecated, please use --tools-file instead
```
Fixes#514
---------
Co-authored-by: Yuan <45984206+Yuan325@users.noreply.github.com>
This tool can be used across all postgres sources.
`postgres-execute-sql` config is as below:
```
tools:
postgres_execute_sql_tool:
kind: "postgres-execute-sql"
source: my-alloydb-source // or any other sources that is compatible with this tool
description: Use this tool to execute sql.
```
The `postgres-execute-sql` tool takes one parameter. Example request as
follow:
```
curl -X POST -H "Content-Type: application/json" -d '{"sql": "SELECT 1"}' http://127.0.0.1:5000/api/tool/postgres_execute_sql_tool/invoke
```