Skip to main content
Glama

Describe Database Table

unfour.db.describe_table
Read-onlyIdempotent

Describe a table's columns, indexes, foreign keys, and DDL to inspect its schema and metadata without reading any table data.

Instructions

Describes a table's columns, available indexes, foreign keys and DDL, with runtime metadata capabilities, through the Unfour command bus. Does not read table data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaNoOptional schema name filter (e.g. 'public').
catalogNoOptional database catalog.
tableNameYesRequired table name to describe.
workspaceIdNoOptional workspace ID. Uses the active workspace if omitted.
connectionIdYesRequired saved database connection ID.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYes
sourceYes
connectionIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv0.10.0
    • addedInput schema / properties / catalog
      Added value: +{
      +  "description": "Optional database catalog.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / table / properties / capabilities
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "ddl": {
      +      "type": "boolean"
      +    },
      +    "foreignKeys": {
      +      "type": "boolean"
      +    },
      +    "indexes": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "indexes",
      +    "foreignKeys",
      +    "ddl"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / table / properties / columns / items / properties / autoIncrement
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / table / properties / columns / items / properties / defaultValue
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / table / properties / columns / items / properties / generated
      Added value: +{
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / table / properties / columns / items / required
      Previous value: -[
      -  "name",
      -  "dataType",
      -  "nullable",
      -  "primaryKey"
      -]New value: +[
      +  "name",
      +  "dataType",
      +  "nullable",
      +  "primaryKey",
      +  "defaultValue",
      +  "generated",
      +  "autoIncrement"
      +]
    • addedOutput schema / properties / table / properties / ddl
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / table / properties / foreignKeys
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "columns": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "name": {
      +        "type": "string"
      +      },
      +      "referencedColumns": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "referencedTable": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "columns",
      +      "referencedTable",
      +      "referencedColumns"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / table / properties / indexes
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "columns": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "name": {
      +        "type": "string"
      +      },
      +      "primary": {
      +        "type": "boolean"
      +      },
      +      "unique": {
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "columns",
      +      "unique",
      +      "primary"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / table / required
      Previous value: -[
      -  "name",
      -  "kind",
      -  "columns",
      -  "columnCount"
      -]New value: +[
      +  "catalog",
      +  "schema",
      +  "name",
      +  "kind",
      +  "ddl",
      +  "columnCount",
      +  "columns",
      +  "indexes",
      +  "foreignKeys",
      +  "capabilities"
      +]
  2. Changed1 schema field changedv0.6.0
    • addedOutput schema / properties / table / properties / catalog
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  3. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, openWorldHint=true, and destructiveHint=false, so the safety profile is covered. The description adds the useful boundary that it is metadata-only, but 'with runtime metadata capabilities, through the Unfour command bus' is vague rather than informative, and no auth or latency behavior is disclosed.

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?

Two compact sentences with the scope and the exclusion front-loaded, which is efficient. The phrase 'with runtime metadata capabilities, through the Unfour command bus' is filler that does not carry actionable meaning and slightly dilutes the otherwise tight structure.

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 an output schema present, a fully documented parameter schema, and read-only annotations, the description needn't explain return values or safety. It states the resource and the metadata-vs-data boundary, which is sufficient for correct invocation, though it stops short of describing any return-shape nuance.

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 all five parameters (including optional schema, catalog, and workspaceId) are already documented in the schema. The description adds no additional parameter meaning, making the baseline 3 appropriate.

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?

The description names a specific verb and resource ('Describes a table') and enumerates the returned artifacts (columns, indexes, foreign keys, DDL), which lets an agent distinguish it from siblings like db.list_tables, db.query_readonly, and db.export_table. The closing clause 'Does not read table data' draws an explicit boundary against the data-reading siblings.

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?

The negative constraint 'Does not read table data' functions as an implicit when-not, steering the agent away from this tool for data retrieval. However, no alternative is named and there is no positive statement of when to prefer this over db.list_tables or db.query_readonly, so usage is only implied.

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

Deploy Server

Other Tools