Skip to main content
Glama

table_schema

Read-only

Get the schema (columns) of a specific data table.

Returns column metadata including name, PostgreSQL type, nullability, default expression, and ordinal position. It also lists uniqueColumns (the column sets with a unique rule); ON CONFLICT works only on those. Useful for understanding table structure before writing queries.

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": {
      "tableId": "<tableId>"
    },
    "name": "table_schema"
  }
}

Input Schema

NameRequiredDescriptionDefault
tableIdYesThe data table ID (from table_list)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare this read-only and non-destructive, so the bar is lower, yet the description adds real value by enumerating the returned metadata (name, PostgreSQL type, nullability, default expression, ordinal position) and the uniqueColumns/ON CONFLICT constraint. With no output schema, this disclosure of return shape is meaningful behavioral context.

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 short sentences: purpose first, return contents second, usage last. Zero redundancy and well front-loaded, though the closing usage sentence is the least substantive of the three.

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?

For a one-parameter read tool the description covers purpose, return fields, and a usage hint. However, with no output schema it lacks any statement of shape beyond a flat field list (e.g., what to do if the table doesn't exist or how the uniqueColumns are structured), leaving minor gaps.

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 coverage is 100% and the single tableId parameter is already documented as coming from table_list. The description adds no format, validation, or sourcing detail beyond the schema, so the 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?

The opening sentence names a specific verb and resource (get the schema/columns of a specific data table), so the agent immediately knows what it retrieves. It stops short of explicitly distinguishing itself from neighbors such as table_list or report_schema, though the param schema's reference to table_list implies the relationship.

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

Usage Guidelines3/5

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

"Useful for understanding table structure before writing queries" gives implied usage but no explicit when-not or named alternatives (e.g., table_query or table_sql for reading data). An agent can infer it is a pre-flight introspection step, but the guidance is soft rather than directive.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.