Skip to main content
Glama
foxter-io

PostgreSQL MCP Server

by foxter-io

Describe PostgreSQL Table

pg_describe_table
Read-onlyIdempotent

Retrieve detailed table metadata including columns, data types, constraints, indexes, and foreign keys. Choose between JSON or Markdown output.

Instructions

Full description of a table: columns, data types, constraints, indexes, and foreign keys.

Args:

  • table: Table name (required)

  • schema: Schema name (default: public)

  • response_format: Output format

Returns: JSON: { table, schema, columns: ColumnInfo[], foreign_keys: ForeignKeyInfo[], check_constraints, indexes: IndexInfo[] } Markdown: multi-section formatted description

Errors:

  • "Table not found" if table/schema doesn't exist

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYesTable name
schemaNoPostgreSQL schema name (default: public)public
response_formatNoOutput format: 'markdown' for human-readable, 'json' for machine-readablemarkdown
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and idempotentHint=true. The description adds that the tool returns JSON or Markdown and lists possible errors. It does not disclose additional behavioral traits beyond what annotations provide.

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 concise with clear sections for Args, Returns, and Errors. Every sentence is informative without unnecessary words. It is well-structured and front-loaded with the core purpose.

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?

The description fully explains the tool's functionality, inputs, return formats, and error cases. Despite lacking an output schema, it details both JSON and Markdown output structures, making it complete for a read-only describe tool.

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 baseline is 3. The description repeats parameter explanations (table name, schema default, response_format enum) but adds minor context like default values and error messages. It does not significantly enhance understanding beyond the schema.

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 it provides a full description of a table including columns, data types, constraints, indexes, and foreign keys. It uses specific verbs and resource, distinguishing it from sibling tools like pg_list_tables or pg_get_ddl.

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 explains the usage context (table name, optional schema, format) and expected outputs. However, it does not explicitly state when to use this tool versus alternatives among the many sibling tools, though the purpose is clear enough for inference.

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/foxter-io/mcp-postgresql'

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