Skip to main content
Glama
MySQL MCP Server

MySQL MCP Server

by berthojoris

read_table_schema

Read-onlyIdempotent

Returns a table's schema details—columns, data types, constraints, keys, indexes, and defaults—so you can inspect its structure before writing queries or migrations.

Instructions

Returns complete schema definition for a table: columns, data types, constraints, keys, indexes, and defaults. Use when you need detailed structural information about a specific 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_name": "<table_name>"
    },
    "name": "read_table_schema"
  }
}

Input Schema

NameRequiredDescriptionDefault
table_nameYesName of the table to read schema from

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.46.0

TDQS

A3.6/5.0
Behavior3/5

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

The annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so safety behavior is covered without description support. The description's added value is the enumerated return contents, which matters because there is no output schema, but it says nothing about error behavior (e.g., unknown table name), qualification of names, or output format.

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 tight sentences with the payload contents front-loaded and the usage cue second. Every clause carries information and nothing is redundant padding.

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 one-parameter read tool with strong annotations, the definition covers purpose and return contents adequately even without an output schema. The remaining minor gap is that nothing describes failure modes or name-qualification expectations, which for a schema lookup tool is a small but real omission.

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?

There is a single required parameter with 100% schema description coverage, so the schema already defines table_name fully. The description adds no syntax detail such as schema-qualified naming, case sensitivity, or whether views are accepted, so the baseline 3 applies.

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 gives a specific verb and resource ('Returns complete schema definition for a table') and enumerates the payload contents (columns, data types, constraints, keys, indexes, defaults), which clearly distinguishes it from a keyword search like search_schema. However, it never explicitly contrasts itself with overlapping siblings such as get_schema_erd or analyze_table, so differentiation is only implied.

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?

'Use when you need detailed structural information about a specific table' is a genuine when-to-use cue, but it is generic and offers no exclusions or named alternatives. An agent must still infer on its own whether search_schema or get_schema_erd is the better choice for a given lookup.

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