Skip to main content

Snowflake Intelligence

Snowflake Intelligence is the supported agent integration path for this version of Metatate.

Metatate keeps its canonical governance tools and MCP server intact:

  • core.metatate_mcp
  • core.discover_context(input VARIANT) and peers

But Snowflake Intelligence custom tools bind named scalar parameters, not a single VARIANT request object. To bridge that mismatch, Metatate provides an adapter layer of Snowflake Intelligence-friendly wrappers:

  • core.agent_discover_context
  • core.agent_get_decision_context
  • core.agent_inspect_data_meaning
  • core.agent_authorize_use
  • core.agent_validate_query_context
  • core.agent_explain_why

These wrappers forward into the canonical Metatate tools and return the same JSON payloads.

Prerequisites

  1. Metatate installed and running in your account
  2. At least one policy deployed so governance tables contain data
  3. Snowflake Intelligence enabled for your account and role
  4. An Intelligence agent created in a schema where your role can manage agents

Step 1: Create a Snowflake Intelligence agent

  1. Open AI & ML -> Agents in Snowsight
  2. Click Create agent
  3. Choose a writable database and schema
  4. Create an agent such as:
    • object name: METATATE_TEST_AGENT
    • display name: Metatate Test Agent

Step 2: Add the Metatate custom tools

Open the agent's Tools tab and add the following six custom tools.

1. core.agent_discover_context

  • Resource type: function
  • Object: core.agent_discover_context
  • Parameters:
    • database_name -- string
    • schema_name -- string
    • min_sensitivity -- string
    • compliance_framework -- string
    • has_pii -- boolean
    • domain -- string

Use this for questions like:

Which confidential tables in DEV contain PII?

2. core.agent_get_decision_context

  • Resource type: function
  • Object: core.agent_get_decision_context
  • Parameters:
    • table_name -- string, required

Use this for questions like:

What governance policies apply to DEV.PUBLIC.LINEITEM?

3. core.agent_inspect_data_meaning

  • Resource type: function
  • Object: core.agent_inspect_data_meaning
  • Parameters:
    • table_name -- string, required
    • column_name -- string

Use this for questions like:

What does the EMAIL column mean from a governance perspective?

4. core.agent_authorize_use

  • Resource type: procedure
  • Object: core.agent_authorize_use
  • Parameters:
    • table_name -- string, required
    • operation -- string, required
    • intended_use -- string, required
    • actor_role -- string
    • destination_system -- string
    • destination_jurisdiction -- string

Use this for questions like:

Can I export DEV.PUBLIC.LINEITEM to Salesforce for reporting?

5. core.agent_validate_query_context

  • Resource type: procedure
  • Object: core.agent_validate_query_context
  • Parameters:
    • sql_text -- string, required
    • operation -- string
    • intended_use -- string
    • actor_role -- string

Use this for questions like:

Validate this query: SELECT L_ORDERKEY FROM DEV.PUBLIC.LINEITEM

6. core.agent_explain_why

  • Resource type: procedure
  • Object: core.agent_explain_why
  • Parameters:
    • decision_id -- string, required

Use this for questions like:

Why was decision dec_abc123 denied?

Step 3: Save the agent

Save the agent after adding or editing the custom tools. Snowflake Intelligence chat threads do not reliably pick up unsaved tool changes.

Step 4: Test the first workflow

Start a new thread with the agent and ask:

What governance policies apply to DEV.PUBLIC.LINEITEM?

Expected behavior:

  • the agent calls core.agent_get_decision_context
  • Metatate returns the standard decision-context JSON payload
  • the agent summarizes policy, sensitivity, instructions, compliance, and risk metadata

Practical prompt examples

IntentPromptExpected wrapper
DiscoveryWhich confidential tables in DEV contain PII?core.agent_discover_context
Decision contextWhat governance policies apply to DEV.PUBLIC.LINEITEM?core.agent_get_decision_context
Meaning inspectionShow me the governance meaning of the EMAIL column in DEV.PUBLIC.CUSTOMERS.core.agent_inspect_data_meaning
AuthorizationCan I export DEV.PUBLIC.LINEITEM to Salesforce for reporting?core.agent_authorize_use
Query validationValidate this query: SELECT L_ORDERKEY FROM DEV.PUBLIC.LINEITEMcore.agent_validate_query_context
Decision explanationWhy was decision dec_abc123 denied?core.agent_explain_why

Troubleshooting

The agent says it hit a SQL compilation error

Most likely cause: you wired a canonical core.*(input VARIANT) tool directly into the agent instead of the corresponding core.agent_* wrapper.

The agent ignores a newly added tool

Save the agent, then start a new thread. Unsaved changes and old threads may not use the latest tool configuration.

Snowflake Intelligence says "No agents available"

Create an agent first and ensure your current role can access it.

The wrapper works in SQL but not in the agent

Double-check:

  • resource type matches the wrapper object type (function vs procedure)
  • parameter names match exactly
  • required parameters are present

What this does not cover

This page does not document Claude Desktop, Cursor, or generic HTTP MCP clients. Those external connection paths are out of scope for this version's supported integration guidance.