bonito-mcp-server

v0.2.0
bonito-mcp-server Checked 8 hours ago Published 2 months ago

Bonito MCP server — deep DB observability tools for AI agents (BON-004).

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_slow_queries

Top N slowest queries in a period. Returns query_text, calls, avg_ms, max_ms, rows. Example: 'which queries are slow on rds-prod right now?' -> get_slow_queries(db_instance='rds-prod', period='1h').

ParameterTypeDescription
db_instancestring
limitinteger
periodstring

get_active_locks

Currently active lock events / blocking pairs. Returns blocking_pid, blocked_pids, lock_mode. Example: 'are there locks on the orders table?' -> get_active_locks().

ParameterTypeDescription
db_instancestring
minutesinteger

get_blocking_tree

Blocking tree: each blocker PID mapped to the PIDs it blocks. Use before deciding to kill a session. Example: 'who is blocking whom?'

ParameterTypeDescription
db_instancestring
minutesinteger

explain_query

Execution plan (EXPLAIN JSON) for a query fingerprint: node types, seq scans, index usage, cost. Example: 'what is the plan for fingerprint -6842865755026457642?' -> explain_query(fingerprint='-6842865755026457642').

ParameterTypeDescription
fingerprint *string
db_instancestring

get_wait_analysis

Wait breakdown by wait_event_type (Lock, IO, CPU, Client, etc.) with counts and total age. Example: 'what are sessions waiting on?' -> get_wait_analysis().

ParameterTypeDescription
db_instancestring
minutesinteger

compare_to_baseline

Compare a query's current avg_ms against its 7-day baseline. Returns baseline mean/p95, regression_pct and an anomaly verdict (status: normal|regression, zscore). Use when deciding if a query is actually slower. Example: 'is the checkout query slower than usual?' -> compare_to_baseline(fingerprint='...').

ParameterTypeDescription
fingerprint *string
daysinteger
db_instancestring

suggest_remediation

Actionable remediation advice for a DB issue. issue_type in {slow_query, lock, blocking, bloat, wait_io, wait_lock}. Example: 'what should we do about this lock?' -> suggest_remediation(issue_type='lock').

ParameterTypeDescription
detail
issue_typestring

get_db_health_summary

Executive health summary: sessions by state, top table bloat. Example: 'give me a health summary of the database' -> get_db_health_summary().

ParameterTypeDescription
db_instancestring
minutesinteger