Skip to main content
Glama

db_processlist

Summarize an instance's database connection saturation and active sessions, with grouped counts, oldest age, and longest-running queries; set full=true for raw session data.

Instructions

Show an instance's DB connection saturation + a session summary. By default SUMMARISES server-side (saturation, sessions grouped by command/state with counts + oldest age, and the 10 longest-running queries) instead of dumping every row. Pass full=true for the raw SHOW FULL PROCESSLIST / pg_stat_activity dump. Requires a db_profile for the instance; password from your secret store. Read-only query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appNoWebsite/app to target when the instance hosts several DBs (e.g. 'shop.example.com'); matched loosely against stored site labels. Omit for a single-DB instance.
fullNoReturn the raw per-session dump instead of the summary.
instance_idYesInstance ID or name. '<account>/<name>' picks the server of one provider account; custom servers are 'custom/<name>'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.28.0
    • changedInput schema / properties / instance_id / description
      Previous value: -"Instance ID, name, or custom-server name."New value: +"Instance ID or name. '<account>/<name>' picks the server of one provider account; custom servers are 'custom/<name>'."
  2. Addedv2.24.0
  3. Removedv2.23.8
  4. Changed1 schema field changedv2.23.0
    • addedInput schema / properties / app
      Added value: +{
      +  "default": "",
      +  "description": "Website/app to target when the instance hosts several DBs (e.g. 'shop.example.com'); matched loosely against stored site labels. Omit for a single-DB instance.",
      +  "type": "string"
      +}
  5. First observedv1.0.0

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it declares the operation read-only, states the auth requirement (db_profile plus password from the secret store), and contrasts the summarised default with the raw per-session dump so the agent knows the cost/verbosity of each mode.

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?

Three sentences, front-loaded with the purpose, then the default behavior, then the override and prerequisite. Every clause carries information; nothing is padded or restated.

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?

For a tool with no annotations and no output schema, the description compensates well by enumerating what the summary returns (saturation, sessions grouped by command/state with counts and oldest age, and the 10 longest-running queries). Auth and mode requirements are all present, leaving no obvious gap an agent would need.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents instance_id, app and full. The description reinforces the default-vs-full distinction but adds no syntax or format detail beyond what the schema provides, so the baseline 3 applies.

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

Purpose4/5

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

States a specific verb and resource ('Show an instance's DB connection saturation + a session summary') and explicitly scopes what the default output contains versus the raw dump. It is clear what the tool does, but it never distinguishes itself from the overlapping sibling db_top_queries, which also surfaces slow queries.

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

Usage Guidelines4/5

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

Gives explicit mode guidance: default summarises the server-side view, and 'Pass full=true for the raw SHOW FULL PROCESSLIST / pg_stat_activity dump'. It also flags the prerequisite ('Requires a db_profile for the instance'). It stops short of saying when to prefer this over db_top_queries or other DB diagnostics.

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