get_slow_queries
Retrieves slow queries with execution statistics from MySQL Performance Schema to diagnose performance issues and identify queries for optimization.
Instructions
[Tool Purpose]: Get slow queries from Performance Schema
[Exact Functionality]:
Show slowest queries with execution statistics
Display query text, execution count, and timing information
Show rows examined and returned
Order by total execution time
[Required Use Cases]:
When user requests "slow queries", "performance analysis", "query optimization"
When diagnosing performance issues
When identifying problematic queries
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_slow_queries"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of queries to return (default: 20) | |
| database_name | No | Database name to connect to (uses default if omitted) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |