Skip to main content
Glama

list_objects

Read-onlyIdempotent

Lists tables, views, and sequences in a schema, or extensions in a database, returning names, types, and schema details for inspection.

Instructions

List the tables, views or sequences in one schema, or every extension in the database (schema_name is not used for extension). Rows give the schema, name and type of each table or view, the schema, name and data type of each sequence, or each extension's name, version, relocatable flag and schema from pg_extension.extnamespace. Read from the system catalogs, so the role's privileges do not hide objects. Use list_schemas for schema names and get_object_details for one object.

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": {
      "schema_name": "<schema_name>"
    },
    "name": "list_objects"
  }
}

Input Schema

NameRequiredDescriptionDefault
object_typeNoObject type: table, view, sequence or extension (default table)
schema_nameYesSchema name (not used for extension)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.10
    • changedInput schema / properties / schema_name / description
      Previous value: -"Schema name"New value: +"Schema name (not used for extension)"
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description adds real behavioral context beyond them: it states the data comes straight from the system catalogs so the role's privileges do not filter objects. That nuance materially changes how an agent should interpret the results.

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?

Three sentences, each doing work: mode/scope first, return-row shape second, navigation and catalog behavior last. Minor redundancy in repeating that schema_name is unused for extension, but nothing is padded.

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?

No output schema exists, so the description carries return-value burden and does so by enumerating the columns returned for tables/views, sequences, and extensions respectively. Combined with the catalog-visibility note, an agent has everything needed to call and interpret this 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 both parameters are documented structurally, including the object_type default and the extension caveat. The description restates the schema_name caveat but adds no format, casing, or wildcard details beyond the schema, so baseline 3 applies.

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?

Names a specific verb (list) plus the exact resources (tables, views, sequences, extensions) and the scope (one schema vs. whole database for extensions). The two operating modes are distinguished in the first sentence, so an agent can tell this apart from list_schemas and get_object_details without opening any schema.

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

Usage Guidelines5/5

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

Explicitly routes the agent: use list_schemas for schema names and get_object_details for a single object, and warns that schema_name is not used in extension mode. This is exactly the when/when-not/alternative guidance needed.

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