Overview
Tool Name
Purpose
The snowflake_tools suite gives you Snowflake-specific power that goes beyond standard SQL. Work with stages and files, run Python in Snowpark, and use Cortex search to retrieve AI-ranked results from indexed content.Key Features & Functions
Stage Operations
List, upload, read, and delete files in Snowflake stages to support file-based pipelines.
Snowpark Python
Execute Python against Snowflake data for analytics, data science, and ML.
Cortex Search
Run AI-powered search over configured services to surface relevant content quickly.
Artifacts
Persist outputs and files as artifacts for easy sharing and traceability.
Input Parameters for Each Function
_list_stage_contents
Parameters
_add_file_to_stage
Parameters
_delete_file_from_stage
Parameters
_read_file_from_stage
Parameters
For binary reads, set
is_binary = true. If you also set save_artifacts = true, the file will be persisted and returned with an artifact link._cortex_search
Parameters
_run_snowpark_python
When an administrator has hidden the virtual System
Snowflake connection and
a Snowpark call resolves to connection_id="Snowflake", Genesis returns
success: false with type: connection_disabled before opening the session.
Pass an explicit user-created Snowflake connection id when the built-in
connection is hidden.On SQLite-metadata deployments (SNOWFLAKE_METADATA=FALSE), stage and Snowpark
entry points that resolve the default connection_id="Snowflake" return
success: false with error_code: STAGE_REQUIRES_SNOWFLAKE_CONNECTION before
opening a session. Pass a user-created saved Snowflake connection id, or use
execute_python_code(executor="local") when Snowflake is not configured.For multi-file inline runs, pass helper modules in
additional_imports, such
as ["helper.py"] or ["pkg/helper.py"]. Genesis stages those helper files
for Snowpark imports without converting the main inline script into a staged
module.Use Cases
- Create data visualizations from Snowflake data with matplotlib or similar libraries.
- Perform advanced statistical analysis on enterprise datasets.
- Build and run machine learning models inside Snowflake.
- Process CSVs by uploading to stages and analyzing with Snowpark.
- Generate automated reports and dashboards with Python-based workflows.
- Search indexed documentation and knowledge bases using Cortex AI.
- Spin up temporary data workflows that leverage Snowflake compute.
- Develop custom transformation scripts for large-scale datasets.
- Combine SQL and Python for interactive analysis.
- Manage file-based pipelines for ETL and data quality validation.
Workflow/How It Works
- Land files with
_add_file_to_stageor verify with_list_stage_contents. - Transform and analyze using
_run_snowpark_pythonwith access to Snowflake data. - Discover content via
_cortex_searchfor AI-ranked retrieval when needed. - Retrieve or share with
_read_file_from_stage, optionally saving results as artifacts.
Integration Relevance
- data_connector_tools for SQL-centric operations that complement Snowpark workloads.
- file_manager_tools to register outputs and maintain lineage.
- artifact_manager_tools to persist visualizations, CSVs, or notebooks.
- project_manager_tools to track Snowflake tasks across missions and todos.
- image_tools to inspect or analyze images generated by Snowpark code.
Configuration Details
- Use forward slashes in stage paths and avoid special characters.
- Ensure your role has
USAGEon the database and schema, plus required privileges on the stage. - When stage creation fails because the Snowflake session has no current database, Genesis returns
error_code: CONNECTION_DATABASE_UNAVAILABLEnaming the connection’s configured database and schema. Fix those fields in Config → Connections, grant the roleUSAGEon the database, or pass a differentconnection_id. - In Snowpark, set a top-level
resultvariable in your code to capture returned output. - Cortex services must be provisioned and indexed before you can query them.
- Package names should exclude standard libraries and list only additional needs.
Limitations or Notes
- Stage and Snowpark operations require appropriate Snowflake permissions.
- Large files and long-running Python jobs may hit resource or timeout limits.
- First-time package installation in Snowpark can add latency.
- Cortex search availability depends on account features and service configuration.
- Complex Python tasks can require significant compute and time.
- Binary file handling may require
is_binary = trueandmax_bytestuning. - Network connectivity to Snowflake is required for all operations.
_sync_git_to_stagenever uploads.gitmetadata.exclude_git_metadatadefaults totrue; passingfalseis refused. Clone or push the repository to share its Git history.
Output
- Stage Operations Listings, upload confirmations, deletions, and resolved file paths.
- File Content Returned text or binary bytes with size and encoding info when requested.
- Cortex Search Ranked results with relevance scores and snippets.
- Snowpark Execution
Captured
result, console logs, and optional artifacts for downstream use. - Artifacts Artifact ids and links for reports, images, or data files created during execution.
- Errors Clear messages for permission issues, invalid paths, missing services, or runtime failures.

