Skip to main content
Glama

get_object_details

Read-onlyIdempotent

Retrieve table or view columns, constraints, indexes, sequence settings, or extension metadata from system catalogs to inspect database object structure and definitions.

Instructions

Show the columns (data type, nullability, default), constraints and indexes of a table or view, the data type, start and increment of a sequence, or an extension's version, relocatable flag and schema from pg_extension.extnamespace (schema_name is not used for extension). Read from the system catalogs, so the role's privileges do not hide anything. Use list_objects to find names.

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>",
      "object_name": "<object_name>"
    },
    "name": "get_object_details"
  }
}

Input Schema

NameRequiredDescriptionDefault
object_nameYesObject name
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

A3.9/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 covered. The description does add genuinely non-obvious behavior: it reads system catalogs so role privileges do not hide objects, and it notes schema_name is ignored for extensions, with extnamespace used instead. It omits error behavior for missing objects and any note on output shape.

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?

Front-loaded with the most common case (table/view) and every sentence carries information: return attributes, catalog visibility, and the list_objects pointer. The opening sentence is a long multi-branch run-on that could be split for readability, but nothing is wasted.

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?

With no output schema, the description carries the return-value burden and does so thoroughly by enumerating attributes per object type. The catalog-visibility note and the extension/schema_name caveat round out what an agent needs. Missing only failure-mode behavior for nonexistent objects.

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 the schema already documents all three parameters, including the default of table and the fact that schema_name is unused for extensions. The description reinforces the object_type branches by mapping each type to its returned attributes, but adds no new syntax or format detail beyond the schema text.

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?

Specific verb ("Show") plus resource (details of a table, view, sequence or extension), and it enumerates exactly which attributes are returned per object type. An agent can distinguish this from list_objects (name discovery) and from query-analysis siblings 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 Guidelines4/5

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

It explicitly routes name discovery to list_objects ("Use list_objects to find names"), which is the main prerequisite an agent would get wrong. It gives clear usage context but no explicit when-not-to-use conditions or guidance on choosing between this and, say, execute_sql for ad-hoc catalog queries.

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