Files
genai-toolbox/docs/en/samples/snowflake/_index.md
Yuan Teoh 293c1d6889 feat!: update configuration file v2 (#2369)
This PR introduces a significant update to the Toolbox configuration
file format, which is one of the primary **breaking changes** required
for the implementation of the Advanced Control Plane.

# Summary of Changes
The configuration schema has been updated to enforce resource isolation
and facilitate atomic, incremental updates.
* Resource Isolation: Resource definitions are now separated into
individual blocks, using a distinct structure for each resource type
(Source, Tool, Toolset, etc.). This improves readability, management,
and auditing of configuration files.
* Field Name Modification: Internal field names have been modified to
align with declarative methodologies. Specifically, the configuration
now separates kind (general resource type, e.g., Source) from type
(specific implementation, e.g., Postgres).

# User Impact
Existing tools.yaml configuration files are now in an outdated format.
Users must eventually update their files to the new YAML format.

# Mitigation & Compatibility
Backward compatibility is maintained during this transition to ensure no
immediate user action is required for existing files.
* Immediate Backward Compatibility: The source code includes a
pre-processing layer that automatically detects outdated configuration
files (v1 format) and converts them to the new v2 format under the hood.
* [COMING SOON] Migration Support: The new toolbox migrate subcommand
will be introduced to allow users to automatically convert their old
configuration files to the latest format.

# Example
Example for config file v2:
```
kind: sources
name: my-pg-instance
type: cloud-sql-postgres
project: my-project
region: my-region
instance: my-instance
database: my_db
user: my_user
password: my_pass
---
kind: authServices
name: my-google-auth
type: google
clientId: testing-id
---
kind: tools
name: example_tool
type: postgres-sql
source: my-pg-instance
description: some description
statement: SELECT * FROM SQL_STATEMENT;
parameters:
- name: country
  type: string
  description: some description
---
kind: tools
name: example_tool_2
type: postgres-sql
source: my-pg-instance
description: returning the number one
statement: SELECT 1;
---
kind: toolsets
name: example_toolset
tools:
- example_tool
```

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Averi Kitsch <akitsch@google.com>
2026-01-27 16:58:43 -08:00

4.3 KiB

title, type, weight, description
title type weight description
Snowflake docs 2 How to get started running Toolbox with MCP Inspector and Snowflake as the source.

Overview

Model Context Protocol is an open protocol that standardizes how applications provide context to LLMs. Check out this page on how to connect to Toolbox via MCP.

Before you begin

This guide assumes you have already done the following:

  1. Create a Snowflake account.
  2. Connect to the instance using SnowSQL, or any other Snowflake client.

Step 1: Set up your environment

Copy the environment template and update it with your Snowflake credentials:

cp examples/snowflake-env.sh my-snowflake-env.sh

Edit my-snowflake-env.sh with your actual Snowflake connection details:

export SNOWFLAKE_ACCOUNT="your-account-identifier"
export SNOWFLAKE_USER="your-username"
export SNOWFLAKE_PASSWORD="your-password"
export SNOWFLAKE_DATABASE="your-database"
export SNOWFLAKE_SCHEMA="your-schema"
export SNOWFLAKE_WAREHOUSE="COMPUTE_WH"
export SNOWFLAKE_ROLE="ACCOUNTADMIN"

Step 2: Install Toolbox

In this section, we will download and install the Toolbox binary.

  1. Download the latest version of Toolbox as a binary:

    {{< notice tip >}} Select the correct binary corresponding to your OS and CPU architecture. {{< /notice >}}

    export OS="linux/amd64" # one of linux/amd64, darwin/arm64, darwin/amd64, or windows/amd64
    export VERSION="0.10.0"
    curl -O https://storage.googleapis.com/genai-toolbox/v$VERSION/$OS/toolbox
    
  2. Make the binary executable:

    chmod +x toolbox
    

Step 3: Configure the tools

You have two options:

Option A: Use the prebuilt configuration

./toolbox --prebuilt snowflake

Option B: Use the custom configuration

Create a tools.yaml file and add the following content. You must replace the placeholders with your actual Snowflake configuration.

kind: sources
name: snowflake-source
type: snowflake
account: ${SNOWFLAKE_ACCOUNT}
user: ${SNOWFLAKE_USER}
password: ${SNOWFLAKE_PASSWORD}
database: ${SNOWFLAKE_DATABASE}
schema: ${SNOWFLAKE_SCHEMA}
warehouse: ${SNOWFLAKE_WAREHOUSE}
role: ${SNOWFLAKE_ROLE}
---
kind: tools
name: execute_sql
type: snowflake-execute-sql
source: snowflake-source
description: Use this tool to execute SQL.
---
kind: tools
name: list_tables
type: snowflake-sql
source: snowflake-source
description: "Lists detailed schema information for user-created tables."
statement: |
    SELECT table_name, table_type 
    FROM information_schema.tables 
    WHERE table_schema = current_schema()
    ORDER BY table_name;

For more info on tools, check out the Tools section.

Step 4: Run the Toolbox server

Run the Toolbox server, pointing to the tools.yaml file created earlier:

./toolbox --tools-file "tools.yaml"

Step 5: Connect to MCP Inspector

  1. Run the MCP Inspector:

    npx @modelcontextprotocol/inspector
    
  2. Type y when it asks to install the inspector package.

  3. It should show the following when the MCP Inspector is up and running (please take note of <YOUR_SESSION_TOKEN>):

    Starting MCP inspector...
    ⚙️ Proxy server listening on localhost:6277
    🔑 Session token: <YOUR_SESSION_TOKEN>
       Use this token to authenticate requests or set DANGEROUSLY_OMIT_AUTH=true to disable auth
    
    🚀 MCP Inspector is up and running at:
       http://localhost:6274/?MCP_PROXY_AUTH_TOKEN=<YOUR_SESSION_TOKEN>
    
  4. Open the above link in your browser.

  5. For Transport Type, select Streamable HTTP.

  6. For URL, type in http://127.0.0.1:5000/mcp.

  7. For Configuration -> Proxy Session Token, make sure <YOUR_SESSION_TOKEN> is present.

  8. Click Connect.

  9. Select List Tools, you will see a list of tools configured in tools.yaml.

  10. Test out your tools here!

What's next