Skip to main content
Glama

get_session_privs

List the system privileges available to the current database connection, including directly granted privileges and effective privileges from enabled roles, deduplicated and ordered.

Instructions

List system privileges available to the current connection: directly granted system privs plus effective privs from enabled roles (deduplicated, ordered). WHEN TO CALL: only when the user explicitly asks what privileges the connection has; do NOT call as a preamble before querying tables or objects.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.16.3

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and delivers substantive behavioral detail: it aggregates directly granted privileges plus effective privileges from enabled roles, deduplicated and ordered. It does not describe the return shape or whether ordering is deterministic, but the aggregation semantics are disclosed well.

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?

The purpose is front-loaded in the first clause, followed by a clearly demarcated WHEN TO CALL section. Both sentences are dense with load-bearing information and there is no filler.

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?

With no output schema, the description must convey the return contents, and it does so reasonably by enumerating what is included (direct grants plus effective role privileges, deduplicated, ordered). It could be marginally richer on output format, but is largely complete for a no-arg read tool.

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 there is no parameter semantics to document; the schema is empty and coverage is 100%. Baseline 4 applies for a no-parameter tool.

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 ('List') and resource ('system privileges available to the current connection'), and further clarifies scope as 'directly granted system privs plus effective privs from enabled roles'. This distinguishes it from the sibling get_session_roles, which covers roles rather than privileges.

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?

Provides an explicit WHEN TO CALL condition (only when the user explicitly asks what privileges the connection has) and an explicit when-not-to-call exclusion (do NOT call as a preamble before querying tables or objects). Nothing 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.