Skip to main content
Glama
call518

MCP PostgreSQL Operations

by call518

get_user_list

Retrieves all PostgreSQL user accounts with permission, superuser, creation, and expiration details to support permission checks, security inspections, and account status overviews.

Instructions

[Tool Purpose]: Retrieve list of all user accounts and permission information on PostgreSQL server

[Exact Functionality]:

  • Retrieve list of all database user accounts

  • Display permission information for each user (superuser, database creation rights, etc.)

  • Include account creation date and expiration date information

[Required Use Cases]:

  • When user requests "user list", "account info", "permission check", etc.

  • When user permission management or security inspection is needed

  • When account status overview is needed

[Strictly Prohibited Use Cases]:

  • Requests for user password information

  • Requests for user creation, deletion, or permission changes

  • Requests for specific user sessions or activity history

Returns: Table-format information including username, superuser status, permissions, and account status

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv3.4.2
    • addedInput schema / additionalProperties
      Added value: +false
    • removedOutput schema / properties / result / title
      Removed value: -"Result"
    • removedOutput schema / title
      Removed value: -"_WrappedResult"
  2. Addedv1.0.0

TDQS

A4.5/5.0
Behavior4/5

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

No annotations are present, so the description carries the full burden: it makes clear this is a read-only retrieval, defines output shape as a table, and explicitly scopes out mutations. It omits whether elevated privileges (e.g. pg_read_all_settings / superuser) are required to see all rows, which is the main remaining behavioral gap.

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

Conciseness4/5

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

Bracketed section headers keep purpose, functionality, use cases, and exclusions front-loaded and scannable. Slightly verbose: the functionality bullets and the Returns line restate what the output schema already defines.

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

Completeness4/5

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

Covers purpose, scope, inclusions, exclusions, and return contents for a zero-parameter read tool that also has an output schema. Only privilege/visibility requirements for non-superusers are unstated.

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 tool takes zero parameters, so the baseline is 4; there is nothing to mis-specify. The description correctly implies a server-wide, unfiltered scope rather than a per-user lookup.

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 and resource (retrieve list of all user accounts plus permission info on the PostgreSQL server) and enumerates exactly what is returned (superuser status, DB creation rights, creation/expiration dates). The prohibited-use section implicitly separates it from session/activity siblings like get_active_connections.

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?

Explicitly lists trigger phrases and scenarios ("user list", "account info", "permission check", permission management, security inspection, account status overview) and an explicit prohibited set (passwords, create/drop/alter, session history). This is the strongest possible when/when-not framing.

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