Skip to main content
Glama
MCP-MySQL-Ops

MCP-MySQL-Ops

by call518

get_table_schema_info

Retrieve detailed schema information for a specific MySQL table or entire database, including columns, indexes, foreign keys, constraints, statistics, defaults, and comments for design analysis.

Instructions

[Tool Purpose]: Get detailed schema information for a specific table or entire database

[Exact Functionality]:

  • If table_name provided: Show all columns, indexes, foreign keys for that table

  • If table_name empty: Show overview of all tables in the database

  • Display table statistics, constraints, and engine information

  • Include column comments and default values

[Required Use Cases]:

  • When user requests "table schema", "table structure", "describe table"

  • When analyzing table design and constraints

  • When requesting database-wide schema analysis with empty table_name

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": "get_table_schema_info"
  }
}

Input Schema

NameRequiredDescriptionDefault
table_nameYesName of the table to analyze (empty string for database overview)
database_nameNoDatabase containing the table (uses current database if omitted)

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does well on output behavior — columns, indexes, foreign keys, statistics, constraints, engine, comments, defaults — and the dual-mode branching. However, it says nothing about read-only guarantees, permissions needed, cost/latency on large schemas, or whether 'overview' is paginated, so a mutation-averse agent gets no explicit safety signal.

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?

Heavily sectioned with bracketed headers, which is scannable and front-loads purpose before mechanics. Some lines are redundant (the 'table schema' trigger list repeats the purpose line), but the structure is deliberate and nothing is wasted at length.

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?

An output schema exists, so return-value shapes need not be spelled out, and both parameters are fully covered by the schema. Combined with the dual-mode behavior explanation, an agent has enough to call this correctly; only the permission/read-only posture is left unstated.

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 coverage is 100% and both parameters are documented inline, including the empty-string convention and the 'uses current database' default. The description restates the empty-table_name meaning but adds no syntax, format, or edge-case detail beyond the schema, so the baseline of 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 states a specific verb and resource ('Get detailed schema information for a specific table or entire database') and immediately clarifies the two modes of operation. It is clearly distinct from size/IO/connection siblings by being the structural-introspection tool, though it never names or contrasts an alternative explicitly.

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?

The '[Required Use Cases]' block gives concrete triggers, including literal user phrasings ('table schema', 'table structure', 'describe table') and the empty-table_name case for database-wide analysis. It stops short of stating when NOT to use it or which sibling to pick instead, so it is clear context without exclusions.

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