Skip to main content
Glama
GeminiDesk MCP
by LZ7TOP

Describe MySQL Table Schema

mysql_describe_table

Inspect a MySQL table's column structure and retrieve its CREATE TABLE statement by specifying the table, optional database, and connection profile.

Instructions

查看指定数据表的字段结构(DESCRIBE)与建表语句(SHOW CREATE TABLE)。

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": {
      "table": "<table>"
    },
    "name": "mysql_describe_table"
  }
}

Input Schema

NameRequiredDescriptionDefault
tableYes数据表名
profileNo连接配置档案名
databaseNo数据库名

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It does disclose the return payload precisely (two outputs: field structure and CREATE TABLE statement), which is genuinely useful, but it never states that the operation is read-only/non-destructive, what permissions the connection profile requires, or what happens when the table or database does not exist.

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?

A single sentence with zero filler that front-loads the resource and immediately enumerates both operations performed. Nothing could be removed without losing information.

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?

There is no output schema, so the description must explain return values — and it does, naming both result sets. But for a schema-introspection tool with three parameters and no annotations, it leaves out the read-only guarantee and failure/default behavior for profile and database, leaving the definition only minimally complete.

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 table, profile and database, and the baseline is 3. The description adds no meaning beyond the schema — it does not say whether database defaults to the profile's database or how profile selection interacts with database, which would have been the valuable addition.

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 description names a specific verb (查看/view) and resource (指定数据表/specified table) and spells out exactly which two result sets are produced: 字段结构 (DESCRIBE) and 建表语句 (SHOW CREATE TABLE). It does not, however, contrast itself with siblings that could also reveal schema (e.g. mysql_query), so differentiation relies on the reader knowing the DESCRIBE/SHOW CREATE TABLE keywords.

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?

Usage is only implied: an agent can infer it should call this when it needs column definitions or DDL before writing a query. There is no explicit when-to-use, no guidance on when mysql_query would be preferable, and no mention of prerequisites such as the table needing to exist or the profile needing to be valid.

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