database
Snowflake CLI for Headless Automation
Use the Snowflake CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.
9 functions 8 read 1 write Manual OAuth token auth
Snowflake CLI for Headless Automation
Use KosmoKrator as a non-interactive integration runtime for local automations and wrappers.
Use headless automation when another tool needs a stable local command surface. The Snowflake CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Snowflake CLI for Headless Automation
kosmokrator integrations:configure snowflake --set access_token="$SNOWFLAKE_ACCESS_TOKEN" --set account="$SNOWFLAKE_ACCOUNT" --enable --read allow --write ask --json
kosmo integrations:call snowflake.snowflake_execute_query '{"sql":"example_sql","warehouse":"example_warehouse","database":"example_database","schema":"example_schema"}' --json Discovery Before Execution
Agents and scripts can inspect Snowflake docs and schemas before choosing a function.
kosmo integrations:docs snowflake --json
kosmo integrations:docs snowflake.snowflake_execute_query --json
kosmo integrations:schema snowflake.snowflake_execute_query --json
kosmo integrations:search "Snowflake" --json
kosmo integrations:list --json Useful Snowflake CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
snowflake.snowflake_execute_query | Write | sql, warehouse, database, schema | Execute a SQL statement on Snowflake. Returns column metadata and result rows. Optionally specify warehouse, database, and schema context. |
snowflake.snowflake_list_databases | Read | none | List all databases in the Snowflake account. Returns database names, identifiers, and creation timestamps. |
snowflake.snowflake_get_database | Read | database | Get details for a specific Snowflake database, including retention time, owner, and size. |
snowflake.snowflake_list_schemas | Read | database | List all schemas within a Snowflake database. Returns schema names and metadata. |
snowflake.snowflake_list_tables | Read | database, schema | List all tables within a Snowflake database schema. Returns table names, types, and metadata. |
snowflake.snowflake_describe_table | Read | database, schema, table | Describe a Snowflake table — get column names, data types, nullable, default values, and other metadata. |
snowflake.snowflake_list_warehouses | Read | none | List all warehouses in the Snowflake account. Returns warehouse names, sizes, and status. |
snowflake.snowflake_get_warehouse | Read | name | Get details for a specific Snowflake warehouse, including size, type, auto-suspend, and auto-resume settings. |
snowflake.snowflake_get_current_user | Read | none | Get the current authenticated Snowflake user and session information. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.