Skip to main content
Glama

diogenes-database-intelligence-mcp

Database Connection Pool Sizing & Concurrency Headroom Calculator

calculate_pool_headroom
Read-onlyIdempotent

Calculates optimal connection pool sizing, idle timeouts, and client headroom based on server RAM and concurrency profile. Use when sizing PgBouncer, HikariCP, or Prisma connection pools to avoid server out-of-memory crashes; for checking transaction isolation hazards, use audit_transaction_isolation instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'server_ram_mb' and 'max_concurrent_clients' ('workload_profile' defaults to 'high_concurrency_oltp'), supports '?demo=true' or L402 (10 sats), and returns HTTP 400 if invalid.

Input Schema

NameRequiredDescriptionDefault
server_ram_mbYesTotal available RAM in megabytes dedicated to the database server instance.
workload_profileNoWorkload operational characteristics: high-concurrency OLTP, heavy analytical OLAP, or serverless edge burst.
max_concurrent_clientsYesPeak anticipated concurrent client connections or serverless worker threads.

Output Schema

NameRequiredDescriptionDefault
memory_headroom_mbYesEstimated unallocated memory buffer in megabytes remaining for query sorting.
recommended_min_idleYesRecommended standby idle connection count for warm latency response.
connection_timeout_msYesRecommended pool connection acquisition timeout in milliseconds.
recommended_max_connectionsYesCalculated optimal max pool size to avoid database thrashing and memory exhaustion.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), yet the description adds real operational context: stateless edge call, 32 KB payload cap, 60 RPM limit, `?demo=true` or L402 payment at 10 sats, and HTTP 400 on invalid input. These are traits an agent cannot get from the annotations and that affect how it should call and retry the tool.

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

Conciseness5/5

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

Two sentences, front-loaded with purpose and alternative routing before the operational constraints. Every clause carries information (cost, rate limit, error behavior); nothing is redundant with the title or restates structured fields.

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?

Since an output schema exists, return values need no explanation, and the description covers the remaining agent needs: inputs, default behavior, rate/size caps, payment option, and error response. Nothing required to invoke it correctly is missing.

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?

Schema coverage is 100%, so baseline would be 3, but the description adds meaning beyond the schema by naming the default value for workload_profile ('high_concurrency_oltp'), which the schema does not state. It also frames server_ram_mb and max_concurrent_clients as the two accepted inputs, reinforcing their roles.

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?

States a specific verb ("Calculates") applied to concrete outputs: pool sizing, idle timeouts, and client headroom, derived from server RAM and concurrency profile. It also names the sibling audit_transaction_isolation as the tool for a different concern, so an agent can separate the two without opening either schema.

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?

Gives an explicit use condition (sizing PgBouncer, HikariCP, or Prisma pools to avoid OOM crashes) and an explicit exclusion routing the agent to audit_transaction_isolation for isolation hazards. Nothing about when to pick this tool is left to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources