Skip to main content
Glama
call518

MCP PostgreSQL Operations

get_table_schema_info

Retrieve detailed schema information for PostgreSQL tables including column definitions, constraints, indexes, and metadata to analyze database structure and relationships.

Instructions

[Tool Purpose]: Retrieve detailed schema information for specific table or all tables in a database

[Exact Functionality]:

  • Retrieve detailed column information including data types, constraints, defaults

  • Display primary keys, foreign keys, indexes, and other table constraints

  • Show table-level metadata such as size, row count estimates

[Required Use Cases]:

  • When user requests "table schema", "column info", "table structure", etc.

  • When detailed table design information is needed for development

  • When analyzing database structure and relationships

[Strictly Prohibited Use Cases]:

  • Requests for actual data inside tables

  • Requests for table structure changes or DDL operations

  • Requests for performance statistics (use other tools for that)

Args: database_name: Database name to query (REQUIRED - specify which database to analyze) table_name: Specific table name to analyze (if None, shows all tables) schema_name: Schema name to search in (default: "public")

Returns: Detailed table schema information including columns, constraints, and metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
database_nameYes
table_nameNo
schema_nameNopublic

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses behavioral traits such as the tool being read-only (implied by 'Retrieve' and prohibitions on data changes), the scope of information returned (column details, constraints, metadata), and exclusions like performance statistics. However, it lacks details on error handling or rate limits.

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 labeled sections ([Tool Purpose], [Exact Functionality], etc.), making it front-loaded and easy to scan. However, some redundancy exists (e.g., repeating parameter info in the Args section), slightly reducing efficiency.

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 complexity (3 parameters, 0% schema coverage, no annotations) and the presence of an output schema (which handles return values), the description is complete. It covers purpose, usage, parameters, and exclusions, providing sufficient context for an agent to invoke the tool correctly without needing additional explanations.

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 meaning by explaining each parameter's role (e.g., 'database_name: Database name to query (REQUIRED - specify which database to analyze)') and default behaviors (e.g., 'if None, shows all tables'), though it doesn't fully detail constraints or formats beyond the schema's basic types.

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's purpose with specific verbs ('Retrieve detailed schema information') and resources ('specific table or all tables in a database'), distinguishing it from siblings like get_table_list (which lists tables) or get_table_size_info (which focuses on size metrics). The structured sections reinforce this clarity.

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 "table schema"') and 'Strictly Prohibited Use Cases' (e.g., 'Requests for actual data inside tables'), including clear alternatives ('use other tools for that'). This directly addresses when to use this tool versus others in the sibling list.

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