Skip to main content
Glama
mysql2-mcp-server

mysql2-mcp-server

by jcxy

mysql_describe_table

Retrieve a MySQL table's structure, including column names, data types, and nullability, to verify schema before querying or modifying data.

Instructions

查看指定表的结构(列名、类型、是否可空等)。可用环境: default(默认: default)。结果行数上限: default ≤ 1000 行,超出会被截断并在返回中标记 truncated;请用 WHERE/LIMIT 收窄范围或先执行 COUNT(*) 取总数

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表名,支持 库名.表名 形式(多库实例无默认库时使用)
environmentNo目标环境名。可用环境: default(默认: default)。未传时使用默认环境

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose real behavior: the target environment and its default, plus the 1000-row cap with a 'truncated' flag in the response. It stops short of stating that the call is read-only or what happens for a nonexistent table, but the truncation and environment defaults are useful beyond what the schema shows.

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

Conciseness3/5

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

The purpose is front-loaded and clear, but the trailing environment and row-limit notes read as generic boilerplate that likely applies to query tools rather than a describe-table tool, diluting the message with inapplicable instructions.

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 simple, two-parameter read tool with full schema coverage and no output schema, the definition covers what the call returns (column metadata) and the environment default. It could add behavior for a missing table or permission failures, but nothing essential to invoking it correctly is absent.

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 both the 'table' and 'environment' parameters are already documented (db.table form, available environments, default fallback). The description only restates the environment default and offers WHERE/LIMIT advice unrelated to this tool's parameters, adding no new parameter meaning.

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 states a specific verb ('查看' – view) and resource ('指定表的结构' – specified table's structure), then enumerates what is returned (column names, types, nullability). This clearly separates it from siblings like mysql_list_tables (enumerates tables) and mysql_query (runs arbitrary SQL).

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 infers it should call this when it needs a table's schema. There is no explicit when-to-use vs alternatives (e.g. mysql_query or mysql_list_tables), and the appended advice about WHERE/LIMIT/COUNT(*) does not actually guide how to use this tool, since it has no such parameters.

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