Directories
¶
| Path | Synopsis |
|---|---|
|
Package config turns the command line and the environment into a validated Config.
|
Package config turns the command line and the environment into a validated Config. |
|
Package db is the only place that holds a connection to the database: a lazy, bounded pool and two transaction runners (read-only and read-write) that apply the session settings and clean up after every call.
|
Package db is the only place that holds a connection to the database: a lazy, bounded pool and two transaction runners (read-only and read-write) that apply the session settings and clean up after every call. |
|
Package explain implements the explain_query tool: a compact summary of a query plan, optionally with hypothetical indexes, always run in a read-only transaction that is rolled back.
|
Package explain implements the explain_query tool: a compact summary of a query plan, optionally with hypothetical indexes, always run in a read-only transaction that is rolled back. |
|
Package format renders tool results as compact, bounded text: CSV tables with a footer line, unit helpers and error text.
|
Package format renders tool results as compact, bounded text: CSV tables with a footer line, unit helpers and error text. |
|
Package health implements the analyze_db_health tool: seven independent checks (index, connection, vacuum, sequence, replication, buffer, constraint) whose findings are rendered as a compact "problems only" report.
|
Package health implements the analyze_db_health tool: seven independent checks (index, connection, vacuum, sequence, replication, buffer, constraint) whose findings are rendered as a compact "problems only" report. |
|
Package httpx serves the MCP server over the HTTP transports, behind a Host/Origin guard that blocks DNS rebinding.
|
Package httpx serves the MCP server over the HTTP transports, behind a Host/Origin guard that blocks DNS rebinding. |
|
Package hypo creates hypothetical indexes with hypopg, explains queries with or without them and estimates their size.
|
Package hypo creates hypothetical indexes with hypopg, explains queries with or without them and estimates their size. |
|
Package indexadv implements the index advisor tools, analyze_query_indexes and analyze_workload_indexes: a greedy search (crystaldba's DTA) over candidate btree indexes, priced with hypothetical indexes and the planner's cost estimates, in one read-only transaction.
|
Package indexadv implements the index advisor tools, analyze_query_indexes and analyze_workload_indexes: a greedy search (crystaldba's DTA) over candidate btree indexes, priced with hypothetical indexes and the planner's cost estimates, in one read-only transaction. |
|
Package locks implements the analyze_locks tool: one snapshot of the lock waits in progress, read from pg_locks and pg_stat_activity, with the transitive root of each blocking chain resolved in Go.
|
Package locks implements the analyze_locks tool: one snapshot of the lock waits in progress, read from pg_locks and pg_stat_activity, with the transitive root of each blocking chain resolved in Go. |
|
Package query holds the execute_sql tool: one SQL statement per call, checked in restricted mode, read through a server-side cursor so that results stay bounded.
|
Package query holds the execute_sql tool: one SQL statement per call, checked in restricted mode, read through a server-side cursor so that results stay bounded. |
|
Package safesql decides whether one SQL statement may run in restricted mode.
|
Package safesql decides whether one SQL statement may run in restricted mode. |
|
Package schema holds the schema inspection tools.
|
Package schema holds the schema inspection tools. |
|
Package server owns the MCP plumbing shared by every tool: the registry, argument decoding, result and error conversion, annotations, the per-call log line and the warnings logged once.
|
Package server owns the MCP plumbing shared by every tool: the registry, argument decoding, result and error conversion, annotations, the per-call log line and the warnings logged once. |
|
Package stats holds the tools that read server statistics, such as get_top_queries.
|
Package stats holds the tools that read server statistics, such as get_top_queries. |
|
Package testpg gives integration tests the DSNs of the Docker fixture and throwaway databases.
|
Package testpg gives integration tests the DSNs of the Docker fixture and throwaway databases. |
Click to show internal directories.
Click to hide internal directories.