Skip to main content
Glama
call518

MCP PostgreSQL Operations

get_database_stats

Retrieve comprehensive PostgreSQL database statistics including transaction counts, I/O performance, tuple operations, and system metrics for performance analysis and monitoring.

Instructions

[Tool Purpose]: Get comprehensive database-wide statistics and performance metrics

[Exact Functionality]:

  • Show database-wide transaction statistics (commits, rollbacks)

  • Display block I/O statistics (disk reads vs buffer hits)

  • Provide tuple operation statistics (returned, fetched, inserted, updated, deleted)

  • Show temporary file usage and deadlock counts

  • Include checksum failure information and I/O timing data

[Required Use Cases]:

  • When user requests "database statistics", "database performance", "transaction stats", etc.

  • When analyzing overall database performance and activity

  • When investigating I/O performance or buffer cache efficiency

  • When checking for deadlocks or temporary file usage

[Strictly Prohibited Use Cases]:

  • Requests for statistics reset or modification

  • Requests for database configuration changes

  • Requests for performance tuning actions

Returns: Comprehensive database statistics including transactions, I/O, tuples, and performance metrics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It effectively discloses behavioral traits: it's a read-only operation (implied by 'Get' and prohibited modification cases), returns comprehensive metrics (listed in detail), and includes scope limitations (database-wide vs. table-specific). However, it doesn't mention potential performance impact or authentication requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections ([Tool Purpose], [Exact Functionality], etc.), but it's verbose with redundant information. For example, the 'Returns' section repeats what's in [Exact Functionality]. Some sentences could be more concise while maintaining clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (database statistics), the description is complete: it explains purpose, detailed functionality, specific use cases, prohibitions, and return values. With an output schema present, it doesn't need to detail return format, and the schema coverage is 100% for 0 parameters, so no gaps exist.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, focusing instead on functionality and use cases. A baseline of 4 is applied since there are no parameters to document.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states the tool's purpose as 'Get comprehensive database-wide statistics and performance metrics' with a clear verb ('Get') and resource ('database-wide statistics and performance metrics'). It distinguishes from siblings like get_table_io_stats or get_index_io_stats by emphasizing 'database-wide' scope, making the distinction clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit 'Required Use Cases' with specific query examples ('database statistics', 'database performance', etc.) and analysis scenarios. It also includes 'Strictly Prohibited Use Cases' that clearly state when NOT to use this tool (e.g., for statistics reset or configuration changes), offering clear alternatives by implication.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/call518/MCP-PostgreSQL-Ops'

If you have feedback or need assistance with the MCP directory API, please join our Discord server