Skip to main content
Glama
pg-insight-mcp

pg-insight-mcp

Describe table

describe_table
Read-onlyIdempotent

Retrieve a PostgreSQL table’s columns, constraints, indexes, and incoming foreign keys to understand its structure and relationships before querying or analysis.

Instructions

Columns, constraints, indexes and incoming foreign keys of a table.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "table": "<table>"
    },
    "name": "describe_table"
  }
}

Input Schema

NameRequiredDescriptionDefault
tableYes
schemaNopublic

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered without the description. The description adds one genuinely useful behavioral detail beyond them — that incoming foreign keys are included, i.e. reverse dependencies, not just outgoing ones — but says nothing about error behavior for a nonexistent table or about cost on large catalogs.

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?

A single front-loaded fragment with no filler; every word corresponds to a real part of the result. It is terse to the point of being a bare noun phrase rather than a statement of what the tool does, which slightly weakens readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 return shape need not be restated, and the safety profile is covered by annotations. The remaining gap is the unmentioned `schema` qualifier, which matters for correctness on a two-parameter catalog tool and is documented nowhere else.

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

Parameters2/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 the burden for both parameters and does not meet it. It implies the `table` argument via 'of a table' but never mentions the `schema` parameter or its 'public' default, which is exactly the kind of qualification an agent needs to avoid resolving a table in the wrong namespace.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific resource and enumerates exactly what is returned: columns, constraints, indexes and incoming foreign keys of a table. That content set clearly separates it from list_tables or sample_rows, though it never explicitly names a sibling or uses a verb phrase to state the action.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance, no prerequisites, and no mention of alternatives such as list_tables (discovery) or run_query (reading data). An agent must infer from the noun phrase alone that this is the schema-inspection step before writing or explaining queries.

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