Skip to main content

Snowflake Intelligence

Snowflake Intelligence is the supported Snowflake-native agent integration path for 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_inspect_governance_rules
  • 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.

For authorization flows, core.agent_authorize_use returns the same matched_instructions payload as core.authorize_use, and core.agent_explain_why returns that same instruction payload plus the stored trace and snapshot metadata.

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 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 governed tables contain PII in <database>?

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 decision context applies to <fully-qualified-governed-table>?

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 <column_name> mean from a governance perspective for <fully-qualified-governed-table>?

4. core.agent_inspect_governance_rules

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

Use this for questions like:

Which usage, validation, and transfer rules apply to <column_name> in <fully-qualified-governed-table>?

5. 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
    • columns_csv -- string
    • destination_system -- string
    • destination_jurisdiction -- string
    • consumer_jurisdiction -- string
    • context_json -- string JSON object

Use this for questions like:

Can <role> export <fully-qualified-governed-table> to <destination> for <intended-use>?

Use this wrapper for the full authorization contract, including column-scoped requests and audit metadata.

6. 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
    • destination_system -- string
    • destination_jurisdiction -- string
    • consumer_jurisdiction -- string

Use this for questions like:

Validate this query for <intended-use>: SELECT <columns> FROM <fully-qualified-governed-table>

7. 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 <decision_id> 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 decision context applies to <fully-qualified-governed-table>?

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 governed tables contain PII in <database>?core.agent_discover_context
Decision contextWhat decision context applies to <fully-qualified-governed-table>?core.agent_get_decision_context
Meaning inspectionShow me the governance meaning of <column_name> in <fully-qualified-governed-table>.core.agent_inspect_data_meaning
Rule inspectionWhich usage, validation, and transfer rules apply to <column_name> in <fully-qualified-governed-table>?core.agent_inspect_governance_rules
AuthorizationCan <role> export <fully-qualified-governed-table> to <destination> for <intended-use>?core.agent_authorize_use
Query validationValidate this query for <intended-use>: SELECT <columns> FROM <fully-qualified-governed-table>core.agent_validate_query_context
Decision explanationWhy was decision <decision_id> 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

This page covers Snowflake Intelligence. For Claude Code, use the Claude Code Plugin guide, which connects Claude Code directly to the Snowflake-managed MCP server through Snowflake OAuth.