Get SQL Analysis
get_sql_analysisIdentify slow SQL statements in a time range, with execution counts, errors, and average time, ranked by elapsed time to diagnose database performance issues.
Instructions
Analyze SQL performance within a time range. Returns SQL statements ranked by total elapsed time, showing execution counts, error counts, and average execution time. Use when investigating database-related performance issues.
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": "get_sql_analysis"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort_by | No | Sort criteria | elapsed_sum |
| end_time | No | End time. Defaults to now. | |
| obj_hash | No | Specific agent object hash. Overrides obj_type. | |
| obj_type | No | Object type filter. Ignored if obj_hash is provided. | |
| max_count | No | Max SQL items to return (max 100) | |
| start_time | No | Start time. Defaults to 1 hour ago. |