Documentation Index
Fetch the complete documentation index at: https://test-8862363a-integrations-snowflake-init.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.

Overview
This integration is the inverse of most Tembo integrations: Snowflake is the MCP client and Tembo is the MCP server. Once configured, your Snowflake users can ask a Cortex Agent things like “list my Tembo sessions” or “trigger a Tembo automation on issue X” directly from Snowflake Intelligence chat — the same surface they already use for Cortex Analyst and Cortex Search. The integration is implemented as a Snowflake-managed MCP server that exposes Tembo’s public REST API as a set ofGENERIC tools. The API token lives in Snowflake’s secret store; agents call the tools through a Python UDF that handles auth and routing.
| Component | Purpose |
|---|---|
Snowflake SECRET | Stores the Tembo API token |
NETWORK RULE + EXTERNAL ACCESS INTEGRATION | Allows egress to api.tembo.io |
Python UDF (tembo_call) | Makes authenticated HTTPS requests to the Tembo REST API |
Snowflake-managed MCP SERVER | Exposes the UDF as named GENERIC tools |
| Cortex Agent | Routes user prompts to the right Tembo tool |
An alternative OAuth2-based path using
CREATE EXTERNAL MCP SERVER is documented in the Advanced section, but requires OAuth2 support that the Tembo MCP server does not yet expose. Use the steps below for any current deployment.Prerequisites
- A Snowflake account with Cortex Agents and Snowflake Intelligence enabled
- A Snowflake role with:
CREATE INTEGRATION ON ACCOUNTCREATE MCP SERVERon the target schemaCREATE AGENTon the target schemaUSAGEon a warehouse the agent will run with
- A Tembo API token — generate one from your Tembo account settings
- The Tembo REST API base URL:
https://api.tembo.io
Step 1: Store the Tembo API Token as a Snowflake Secret
Step 2: Allow Egress to api.tembo.io
Step 3: Create the Python UDF that Calls Tembo
This UDF is the dispatch layer — each tool name maps to a Tembo REST endpoint.Step 4: Create the Snowflake-Managed MCP Server
Expose each route as a namedGENERIC tool. input_constants pins the first UDF argument per tool so the agent only has to supply the args VARIANT.
<db>.<schema> with the database and schema where you created tembo_call.
Step 5: Attach the MCP Server to a Cortex Agent
ALTER AGENT ... MODIFY LIVE VERSION SET SPECIFICATION instead of CREATE OR REPLACE AGENT.
Step 6: Grant Access
Grant the role(s) that will use the agent access to the external access integration, the MCP server, the UDF, and the agent itself:Step 7: Chat with Tembo from Snowflake Intelligence
- In Snowsight, open AI & ML → Snowflake Intelligence
- Pick Tembo Assistant
- Try one of:
- “Show me my five most recent Tembo sessions.”
- “Which repositories are enabled for Tembo?”
- “Trigger the Tembo automation
daily-triagewith{ priority: 'high' }.”
tools/list against tembo_mcp_server, picks the right GENERIC tool, which routes through tembo_call → Tembo REST API → response.
Troubleshooting
tools/list returns nothing
Symptom: The agent doesn’t know about any Tembo tools.
Cause: The role used by the chat session lacks USAGE on the MCP server, or the server was created in a different schema than the one the agent resolves to.
Fix: Confirm the server exists and the grant is in place:
UDF returns 401 or 403
Symptom: Tools execute but return{ "status": 401, ... } or { "status": 403, ... }.
Cause: The secret is wrong or expired, or the executing role lacks USAGE on tembo_api_access_integration.
Fix: Smoke-test the UDF directly:
ALTER SECRET tembo_api_token SET SECRET_STRING = '<new>', and grant USAGE on the access integration to the role.
Agent doesn’t pick a Tembo tool when asked
Symptom: The agent answers from general knowledge instead of calling a tool. Cause: Tool descriptions are too vague. Cortex Agents route on tool descriptions, and ambiguous ones get skipped. Fix: Tighten each tool’sdescription to mention Tembo explicitly and what the tool returns. Re-run the CREATE OR REPLACE MCP SERVER block with sharper descriptions.
EXTERNAL ACCESS INTEGRATION egress blocked
Symptom: UDF errors with a network-related exception.
Cause: The network rule or the access integration is missing, disabled, or doesn’t include api.tembo.io:443.
Fix: Confirm both objects exist and are enabled:
Advanced
Path A: External MCP Connector (OAuth2) — not yet supported
Path A: External MCP Connector (OAuth2) — not yet supported
Snowflake also supports When the Tembo MCP gains native OAuth2 support this section will become the recommended path.
CREATE EXTERNAL MCP SERVER, which is the cleaner long-term shape because it lets Snowflake speak MCP directly to the remote server with OAuth2 auth.Today the Tembo MCP server authenticates with a bearer token, and CREATE EXTERNAL MCP SERVER requires API_USER_AUTHENTICATION with TYPE = OAUTH2. Until the Tembo MCP exposes an OAuth2 endpoint, this path requires you to operate an OAuth2-fronting shim that forwards to the Tembo MCP.For reference, the SQL looks like:Extending the tool set
Extending the tool set
To add a new tool, add an entry to
ROUTES in the Python UDF and a matching entry to the tools: list in the MCP server specification. Re-run both CREATE OR REPLACE statements; the agent picks up the new tool on its next request.Self-hosted Tembo
Self-hosted Tembo
For self-hosted Tembo, replace
https://api.tembo.io with your deployment’s base URL in both the network rule (VALUE_LIST) and the Python UDF (BASE). The rest of the flow is identical.Rotating the API token
Rotating the API token
Generate a new token in Tembo, then update the secret in place:No other objects need to change — the UDF reads the secret fresh on every invocation.
References
- Snowflake — Cortex Agents MCP
- Snowflake — Cortex Agents MCP Connectors
- Tembo — MCP integration
- Tembo — Public API reference