Format documents from Snowflake Cortex Search for RAG usage.
This function extracts content from Cortex Search documents and formats them into a single string suitable for use as context in RAG applications.
Bind MCP tools to a ChatSnowflake instance.
This function filters MCP tools for compatibility, converts them to LangChain Tools, and binds them to the provided LLM using bind_tools().
Convert an MCP tool to a LangChain Tool.
Filter MCP tools based on compatibility and patterns.
Create a Snowflake session from environment variables.
Expected environment variables:
Create a Snowflake session from a connection string in environment variables.
Reads connection string from SNOWFLAKE_CONNECTION_STRING environment variable. Supports environment variable substitution using ${VARIABLE_NAME} syntax.
Required environment variable:
Example connection string with environment variable substitution: SNOWFLAKE_CONNECTION_STRING="snowflake://${SNOWFLAKE_USER}:${SNOWFLAKE_PASSWORD}@${SNOWFLAKE_ACCOUNT}/${SNOWFLAKE_DATABASE}/${SNOWFLAKE_SCHEMA}?warehouse=${SNOWFLAKE_WAREHOUSE}"
Create a Snowflake session using Personal Access Token (PAT) from environment variables.
Reads all credentials from environment variables:
Create a Snowflake session using RSA key pair authentication from environment variables.
Reads all credentials from environment variables:
Get a default Snowflake session with smart fallback strategy.
Tries to create a session in the following priority order:
All methods read from the same SNOWFLAKE_* environment variables.
Centralized Snowflake session creation and management.
Centralized error handling for Snowflake integrations.
Centralized validation utilities for Snowflake integrations.
Input schema for creating Cortex Agents.
Input schema for updating Cortex Agents.