Skip to main content
Glama
igorolv

jdbc-mcp-server

describeTable

describeTable
Read-onlyIdempotent

Inspect a table or view to retrieve its columns, types, nullability, defaults, comments, keys, indexes, constraints, and triggers. Returns complete metadata for one database object.

Instructions

Inspect one known table or view. Use for its fields/columns, types, nullability, defaults, comments, keys, indexes, constraints or triggers. Returns full metadata for that object only; use tableContext when nearby relationships or joins are also needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYes
schemaNo
connectionYesDatabase to run against. Call listConnections for valid names; do not guess.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
typeNoDescribed object type, such as TABLE, VIEW, or MATERIALIZED VIEW.
schemaNo
columnsNoColumn list in database order; for keys, indexes, and joins the order is significant.
indexesNoIndexes available on the table or returned by an index-statistics scan.
remarksNoDatabase comment or description attached to the object, when the driver exposes it.
triggersNoTriggers attached to the table, usually without full body unless requested (opaque).
primaryKeyNo
foreignKeysNoOutgoing foreign keys declared by the table.
referencedByNoIncoming foreign keys from other tables that reference this table (opaque).
checkConstraintsNoCHECK constraints declared on the table, with raw expression and parsed allowed values when available.
uniqueConstraintsNoUnique constraints declared on the table.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive behavior Mend, so the description mainly adds scope context. It discloses that it works on one known object, returns metadata for that object only, and that full metadata is the output. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with strong front-loading: the first states the primary action and benefits, the second clarifies scope and the sibling alternative. Every phrase earns its place and there is no redundancy.

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?

For a metadata inspection tool with rich annotations and an output schema, the description is largely complete. It provides scope, alternative routing, and behavior. The only meaningful gap is the undocumented 'schema' parameter, which prevents a perfect score.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 33%: only 'connection' is described in the schema. The tool description does not compensate by explaining what 'table' and 'schema' mean, whether schema is optional, or how the table identifier should be qualified. This leaves a gap for an agent selecting parameters.

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 opens with a specific verb and resource: 'Inspect one known table or view.' It clarifies the scope and lists concrete metadata facets (fields, columns, types, nullability, defaults, comments, keys, indexes, constraints, triggers), making it distinct from sibling tools like tableContext.

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?

The description states when to use this tool ('Inspect one known table or view') and explicitly names the alternative for related needs: 'use tableContext when nearby relationships or joins are also needed.' This gives clear routing guidance.

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