Skip to main content
Glama
ChingEnLin
by ChingEnLin

describe_table

Read-only

Inspect PostgreSQL table structure before querying: shows columns, data types, nullability, defaults, primary keys, indexes, and foreign keys.

Instructions

Describe a PostgreSQL table: columns with data types, nullability and defaults, plus primary key, indexes and foreign keys.

Use this before writing a query against an unfamiliar table.

Args: table: Table, view or materialized view name. schema: Schema name. Defaults to the session schema, then 'public'. database: Database name. Defaults to the session database.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYes
schemaNo
databaseNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already indicate read-only and non-destructive behavior. The description adds value by detailing exactly what metadata is returned (columns, types, nullability, defaults, keys, indexes). This goes beyond the annotations without contradicting them.

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?

Concise and well-structured: a clear purpose statement, a usage recommendation, and a parameter list. No filler or redundancy; every sentence contributes meaning.

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?

With an output schema present, the description does not need to detail return values. It covers purpose, usage, and parameters sufficiently for the tool's complexity.

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?

Schema description coverage is 0%, so the description carries full responsibility for parameter meanings. The Args section fully explains each parameter, including parameter-specific behavior (e.g., schema defaults to session schema then 'public', database defaults to session database).

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 tool describes a PostgreSQL table with specific details (columns, types, nullability, defaults, keys, indexes). This distinguishes it from sibling tools like list_tables (which lists table names) and sample_rows (which shows data).

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?

Explicitly says 'Use this before writing a query against an unfamiliar table,' providing clear context for when to use it. However, it does not explicitly mention alternatives or when not to use it, but the context is clear enough.

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/ChingEnLin/SQMCPaL'

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