Skip to main content
Glama

describe_table

Analyze PostgreSQL table structure to view columns, data types, primary keys, and foreign keys for database schema understanding.

Instructions

Describe the structure of a table including columns, types, and constraints.

Args:
    table_name: Name of the table to describe
    schema: Schema name (default: public)
    
Returns:
    Table structure with columns, primary keys, and foreign keys

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
table_nameYes
schemaNopublic
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the tool's read-only behavior (describing structure implies no mutation) and specifies what information is returned (columns, types, constraints, primary/foreign keys). However, it doesn't mention potential errors (e.g., if table doesn't exist), performance characteristics, or authentication needs.

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 description is efficiently structured with a clear purpose statement followed by Args and Returns sections. Every sentence earns its place: the first sentence states what it does, and the bullet points provide essential parameter and return value details without redundancy.

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?

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is reasonably complete. It covers purpose, parameters, and return values. However, without an output schema, it could benefit from more detail on the return format (e.g., structure of the output).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, so the description must compensate fully. It successfully adds meaning beyond the bare schema by explaining both parameters: 'table_name' as 'Name of the table to describe' and 'schema' as 'Schema name (default: public)'. This clarifies their purpose and the default value.

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 clearly states the specific action ('Describe the structure of a table') and resource ('table'), distinguishing it from siblings like list_tables (which lists names) or query (which executes queries). It explicitly mentions what gets described: 'columns, types, and constraints'.

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?

The description provides clear context for when to use it (to get table structure details), but doesn't explicitly state when not to use it or name alternatives. For example, it doesn't contrast with describe_view for views or list_constraints for constraint-only listings, though the tool name implies table-specific use.

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/JaviMaligno/postgres_mcp'

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