find_expensive_queries
Identify the most expensive and slowest queries in Snowflake within a configurable lookback period, ranked by elapsed time. Each result shows query text, warehouse, user, elapsed seconds, and data scanned.
Instructions
Find the slowest / most expensive successful queries in the lookback window, ranked by elapsed time. Each result includes a truncated query text preview, warehouse, user, elapsed seconds, and GB scanned.
Args: lookback_days: How many days back to look (default from server config). limit: Max number of queries to return (default from server config, typically 50).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "find_expensive_queries"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| lookback_days | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |