Skip to main content
Glama

List application PostgreSQL roles

postgres_roles_list
Read-onlyIdempotent

List all PostgreSQL application roles in a cluster, showing login and admin flags, connection limits and memberships. Pick a role name to inspect it in detail.

Instructions

List application PostgreSQL roles

Returns an unpaginated items array with name, login, administrative flags, connectionLimit and memberOf, without passwords. Reserved engine identities are hidden; select a name for postgres_role_get.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "cluster": "<cluster>"
    },
    "name": "postgres_roles_list"
  }
}

Input Schema

NameRequiredDescriptionDefault
clusterYesManaged cluster name; the RBAC object is namespace/cluster.
namespaceNoNamespace of the requested object; defaults to default for single-object routes and creation. On collection routes (/clusters, /operations, /events, /events/stream, /orphaned-volumes, /backup-storages and root /metrics), absence includes all authorized namespaces and a value filters to that namespace. A nonexistent explicit namespace returns 404 not_found with resource namespace and its name only when the authenticated caller has a permission in that namespace. Otherwise collections remain empty and object requests retain their normal 403 response without revealing existence. Public and unauthenticated authentication routes do not resolve the parameter.

Output Schema

NameRequiredDescriptionDefault
itemsYes
operationIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • removedInput schema / $defs / NamespaceName
      Removed value: -{
      -  "description": "Project namespace name, 2–32 lowercase letters, digits or hyphens; starts with a letter and ends with a letter or digit. The existing default namespace is reserved.",
      -  "maxLength": 32,
      -  "minLength": 2,
      -  "pattern": "^[a-z][a-z0-9-]{0,30}[a-z0-9]$",
      -  "type": "string"
      -}
    • addedInput schema / $defs / NamespaceName_depth16
      Added value: +{
      +  "description": "Project namespace name, 2–32 lowercase letters, digits or hyphens; starts with a letter and ends with a letter or digit. The existing default namespace is reserved.",
      +  "maxLength": 32,
      +  "minLength": 2,
      +  "pattern": "^[a-z][a-z0-9-]{0,30}[a-z0-9]$",
      +  "type": "string"
      +}
    • addedInput schema / properties / cluster / description
      Added value: +"Managed cluster name; the RBAC object is namespace/cluster."
    • changedInput schema / properties / namespace / $ref
      Previous value: -"#/$defs/NamespaceName"New value: +"#/$defs/NamespaceName_depth16"
    • addedInput schema / properties / namespace / description
      Added value: +"Namespace of the requested object; defaults to default for single-object routes and creation. On collection routes (/clusters, /operations, /events, /events/stream, /orphaned-volumes, /backup-storages and root /metrics), absence includes all authorized namespaces and a value filters to that namespace. A nonexistent explicit namespace returns 404 not_found with resource namespace and its name only when the authenticated caller has a permission in that namespace. Otherwise collections remain empty and object requests retain their normal 403 response without revealing existence. Public and unauthenticated authentication routes do not resolve the parameter."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "PostgresRole_depth16": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "bypassrls": {
      +          "default": false,
      +          "type": "boolean"
      +        },
      +        "connectionLimit": {
      +          "default": -1,
      +          "minimum": -1,
      +          "type": "integer"
      +        },
      +        "createdb": {
      +          "default": false,
      +          "type": "boolean"
      +        },
      +        "createrole": {
      +          "default": false,
      +          "type": "boolean"
      +        },
      +        "login": {
      +          "default": true,
      +          "type": "boolean"
      +        },
      +        "memberOf": {
      +          "default": [],
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "name": {
      +          "maxLength": 63,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "replication": {
      +          "default": false,
      +          "type": "boolean"
      +        },
      +        "superuser": {
      +          "default": false,
      +          "type": "boolean"
      +        },
      +        "validUntil": {
      +          "format": "date-time",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "name",
      +        "login",
      +        "superuser",
      +        "createdb",
      +        "createrole",
      +        "replication",
      +        "bypassrls",
      +        "connectionLimit",
      +        "memberOf"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "properties": {
      +    "items": {
      +      "items": {
      +        "$ref": "#/$defs/PostgresRole_depth16"
      +      },
      +      "type": "array"
      +    },
      +    "operationId": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "items"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.4.3

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description adds genuinely new behavior: results are unpaginated, passwords are omitted from output, and reserved engine identities are hidden. These are non-obvious characteristics an agent could not infer from annotations or schema.

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?

Two sentences, front-loaded with the action, then the return contract and the hand-off to the sibling. The enumerated field list slightly duplicates what the output schema already carries, but it is compact and earns its place by flagging the password omission inline.

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?

An output schema exists, so return values need not be spelled out, yet the description usefully summarizes them; annotations plus the description together give a complete picture for a simple two-parameter list tool. The only gap is untested edge guidance such as behavior with many roles or empty namespaces, which the schema partially covers.

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 cluster name format and the namespace scoping rules are already fully documented in the input schema. The description adds no extra meaning about the cluster or namespace parameters, which is acceptable given the schema baseline but provides no lift.

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 ("List application PostgreSQL roles") and immediately clarifies the payload shape and that reserved engine identities are excluded, so it is distinguishable from the sibling postgres_role_get. An agent can identify what this returns without opening the schema.

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?

Explicitly routes the agent to postgres_role_get when a specific role is needed ("select a name for postgres_role_get"), which is clear usage context for a lookup-first workflow. It stops short of stating when-not to use it (e.g., for large fleets where filtering matters) or naming any other alternative.

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

Deploy Server

Other Tools