Skip to main content
Glama
call518

MCP PostgreSQL Operations

by call518

get_table_list

Retrieve all tables and their schema, owner, and size information from a PostgreSQL database to understand its structure.

Instructions

[Tool Purpose]: Retrieve list of all tables and their information from specified database (or current DB)

[Exact Functionality]:

  • Retrieve list of all tables in specified database

  • Display schema, owner, and size information for each table

  • Distinguish table types (regular tables, views, etc.)

[Required Use Cases]:

  • When user requests "table list", "table listing", "schema info", etc.

  • When need to understand structure of specific database

  • When table size or owner information is needed

[Strictly Prohibited Use Cases]:

  • Requests for data inside tables

  • Requests for table structure changes or creation/deletion

  • Requests for detailed column information of specific tables

Input Schema

NameRequiredDescriptionDefault
database_nameNoDatabase name to query (uses currently connected database if omitted)

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.4.3
    • addedInput schema / properties / database_name / description
      Added value: +"Database name to query (uses currently connected database if omitted)"
  2. Changed6 schema fields changedv3.4.2
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / database_name / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / database_name / title
      Removed value: -"Database Name"
    • removedInput schema / properties / database_name / type
      Removed value: -"string"
    • removedOutput schema / properties / result / title
      Removed value: -"Result"
    • removedOutput schema / title
      Removed value: -"_WrappedResult"
  3. Addedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It discloses what is returned (schema, owner, size, table-type distinction) and that read-only intent, but says nothing about privilege requirements, cost on large catalogs, or how views/foreign tables are labeled in output. Adequate but with real gaps for an unannotated tool.

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?

Bracketed section headers make the content scannable and front-loaded, with purpose stated before details. The formatting is slightly heavy for a one-parameter list operation, but each block carries distinct information and nothing is redundant filler.

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?

An output schema exists, so return-value shape need not be spelled out, and the description still summarizes the key fields. Combined with explicit scope and exclusions, an agent has what it needs to invoke correctly; only privilege and performance behavior are unaddressed.

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% and the single parameter already documents that omitting it uses the current database. The description's parenthetical '(or current DB)' merely repeats that, adding no new meaning beyond the schema. Baseline 3 applies.

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?

States a specific verb and resource: retrieve the list of all tables plus schema, owner, and size, from a named or current database. It also implicitly separates itself from get_table_schema_info by prohibiting 'detailed column information of specific tables'. It does not name those siblings directly, so a 4 rather than a 5.

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?

Gives both a 'Required Use Cases' list and a 'Strictly Prohibited Use Cases' list, which is stronger than most definitions. The exclusions route the agent away from data queries, DDL, and detailed column lookups, but they are phrased as categories rather than naming the actual sibling tools (get_table_schema_info, get_all_tables_stats), so the routing is inferential.

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