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.
Enhanced input schema for agent execution with all parameters.
Input schema for agent feedback submission following official API specification.
Output schema for feedback operations following official API response.
Snowflake Cortex Agent integration with thread management and feedback.
This class provides access to Snowflake's Cortex Agents REST API, enabling managed orchestration of multiple tools with conversation management.
Input schema for updating threads.
Snowflake chat model integration using Cortex LLM functions.
This class provides access to Snowflake's Cortex Complete function with models like llama3.1-70b, mistral-large2, claude-3-5-sonnet, and more.
Wrapper to make MCP tools compatible with LangChain's tool interface.
This wrapper handles the conversion between LangChain's tool calling format and MCP's tool execution format, ensuring seamless integration.