Skip to main content
Glama
call518

MCP PostgreSQL Operations

get_database_schema_info

Retrieve detailed schema information including objects, sizes, and permissions to analyze database organization and access patterns.

Instructions

[Tool Purpose]: Retrieve detailed information about database schemas (namespaces) and their contents

[Exact Functionality]:

  • Show all schemas in a database with their owners and permissions

  • Display schema-level statistics including table count and total size

  • List all objects (tables, views, functions) within specific schema

  • Show schema access privileges and usage patterns

[Required Use Cases]:

  • When user requests "database schema info", "schema overview", "namespace structure", etc.

  • When analyzing database organization and schema-level permissions

  • When exploring multi-schema database architecture

[Strictly Prohibited Use Cases]:

  • Requests for actual data inside tables

  • Requests for schema structure changes or DDL operations

  • Requests for individual table details (use get_table_schema_info for that)

Args: database_name: Database name to query (REQUIRED - specify which database to analyze) schema_name: Specific schema name to analyze (if None, shows all schemas)

Returns: Detailed database schema information including objects, sizes, and permissions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
database_nameYes
schema_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the tool's behavior by listing what information is retrieved (schemas, owners, permissions, statistics, objects) and clarifying it's for analysis/exploration only, not for data retrieval or DDL operations. However, it doesn't mention potential limitations like performance impact or authentication requirements.

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?

The description is well-structured with clear sections ([Tool Purpose], [Exact Functionality], etc.), making it easy to parse. While slightly verbose, each section adds value (e.g., prohibited use cases prevent misuse). Minor trimming could improve efficiency without losing clarity.

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?

Given the tool's complexity (schema analysis with multiple facets), no annotations, and an output schema present, the description is highly complete. It covers purpose, functionality, use cases, prohibitions, parameter semantics, and return value overview, providing all necessary context for an agent to use the tool correctly without needing to infer behavior from sparse structured data.

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 description coverage is 0%, so the description must compensate. It adds meaningful context for both parameters: database_name is 'REQUIRED - specify which database to analyze' and schema_name 'if None, shows all schemas'. This clarifies usage beyond the basic schema types, though it doesn't detail format constraints or examples.

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?

The description explicitly states the tool retrieves detailed information about database schemas and their contents, specifying verb ('retrieve') and resource ('database schemas'). It clearly distinguishes from sibling tools like get_table_schema_info by emphasizing schema-level analysis rather than table details.

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?

The description provides explicit guidance with 'Required Use Cases' (e.g., when user requests 'database schema info') and 'Strictly Prohibited Use Cases' (e.g., requests for actual data inside tables). It names a specific alternative tool (get_table_schema_info) for table details, offering clear when-to-use and when-not-to-use instructions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/call518/MCP-PostgreSQL-Ops'

If you have feedback or need assistance with the MCP directory API, please join our Discord server