get_pg_stat_monitor_recent_queries
Retrieve detailed performance data for recently executed PostgreSQL queries using pg_stat_monitor, including client IP and time-bucket breakdowns for real-time monitoring and client-specific analysis.
Instructions
[Tool Purpose]: Analyze recently executed queries and detailed monitoring information using pg_stat_monitor extension
[Exact Functionality]:
Retrieve detailed performance information of recently executed queries
Display client IP and time bucket information by execution period
Provide more detailed monitoring data than pg_stat_statements
[Required Use Cases]:
When user requests "recent queries", "detailed monitoring", "pg_stat_monitor", etc.
When real-time query performance monitoring is needed
When client-specific or time-based query analysis is required
[Strictly Prohibited Use Cases]:
When pg_stat_monitor extension is not installed
Requests for query execution or data modification
Requests for monitoring configuration changes or data reset
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_pg_stat_monitor_recent_queries"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of recent queries to retrieve (default: 20, max: 100) | |
| database_name | No | Database name to analyze (uses default database if omitted) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |