Skip to main content
Glama
gxc

gaussdb-ro-mcp

by gxc

describe_table

Inspect table or view structure: columns, types, nullability, defaults, comments, primary keys, constraints, indexes, view SQL, and partitions before writing or validating queries.

Instructions

查看表/视图的完整结构:列清单(类型/可空/默认值/注释)、主键与约束、全部索引及其定义;视图返回视图定义 SQL,分区表返回分区清单。适用场景:编写或校对查询前了解表结构、关联键与索引设计。table 为必填(可来自 list_tables 的结果);schema 省略时自动在非系统模式中查找,存在同名表时请显式指定 schema。

Input Schema

NameRequiredDescriptionDefault
tableYes表名或视图名(必填),可来自 list_tables 的结果
schemaNo模式名,可来自 list_schemas 的结果;省略时自动在非系统模式中查找(歧义时报错)
instanceNo数据源名称,省略时使用默认实例。可选实例:demo(默认)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.0
    • changedInput schema / properties / instance / description
      Previous value: -"数据源名称(配置文件中 instance 的 name),省略时使用默认实例"New value: +"数据源名称,省略时使用默认实例。可选实例:demo(默认)"
  2. Changed2 schema fields changedv0.2.6
    • changedInput schema / properties / schema / description
      Previous value: -"模式名,省略时自动在非系统模式中查找(歧义时报错)"New value: +"模式名,可来自 list_schemas 的结果;省略时自动在非系统模式中查找(歧义时报错)"
    • changedInput schema / properties / table / description
      Previous value: -"表名或视图名(必填)"New value: +"表名或视图名(必填),可来自 list_tables 的结果"
  3. First observedv0.2.2

TDQS

A4.1/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses rich return contents (columns with nullability/defaults/comments, constraints, indexes, view SQL, partition lists) and schema resolution behavior (auto-search non-system schemas, error on ambiguity). It does not explicitly state read-only status or permission needs, but for an introspection tool this is substantial disclosure.

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 purpose, followed by usage context and then parameter notes, with no filler. The final clause repeats table/schema details already documented in the input schema, which slightly reduces conciseness.

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 and no annotations, the description supplies necessary return-value details and parameter resolution behavior, enough for correct invocation. It does not cover instance selection (left to the schema) or explicit read-only assurance, but those gaps are minor for a describe 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 the baseline is 3. The description mostly restates details already present in the schema (table required, schema ambiguity handling) and omits the instance parameter entirely, adding little meaning beyond the structured fields.

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?

States a specific verb and resource (查看表/视图的完整结构) and enumerates the exact artifacts returned: columns, keys, constraints, indexes, view SQL, and partitions. It is unmistakably distinct from siblings like list_tables, list_schemas, and execute_select.

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?

Provides a clear use case (编写或校对查询前了解表结构、关联键与索引设计) and cross-references list_tables as a source for the required table parameter. It also warns about schema ambiguity. It lacks an explicit when-not statement or a named alternative such as execute_select for retrieving data.

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