Skip to main content
Glama

describe_table

Display the schema structure of a MySQL database table to understand column definitions, data types, and constraints.

Instructions

Show the schema for a specific table

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
databaseNoDatabase name (optional, uses default if not specified)
tableYesTable name

Implementation Reference

  • The handler function for the 'describe_table' tool. Extracts 'database' (optional) and 'table' (required) parameters, executes a DESCRIBE query via the executeQuery helper, and returns the table schema as JSON-formatted rows.
    case "describe_table": {
      console.error('[Tool] Executing describe_table');
      
      const database = request.params.arguments?.database as string | undefined;
      const table = request.params.arguments?.table as string;
      
      if (!table) {
        throw new McpError(ErrorCode.InvalidParams, "Table name is required");
      }
      
      const { rows } = await executeQuery(
        pool,
        `DESCRIBE \`${table}\``,
        [],
        database
      );
      
      return {
        content: [{
          type: "text",
          text: JSON.stringify(rows, null, 2)
        }]
      };
    }
  • src/index.ts:89-106 (registration)
    Registration of the 'describe_table' tool within the ListToolsRequestSchema handler. Includes the tool's name, description, and input schema definition.
    {
      name: "describe_table",
      description: "Show the schema for a specific table",
      inputSchema: {
        type: "object",
        properties: {
          database: {
            type: "string",
            description: "Database name (optional, uses default if not specified)"
          },
          table: {
            type: "string",
            description: "Table name"
          }
        },
        required: ["table"]
      }
    },
Behavior2/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 of behavioral disclosure. It states the tool shows a schema, implying a read-only operation, but doesn't cover aspects like permissions needed, error handling, response format, or any side effects. For a tool with no annotation coverage, this is a significant gap in transparency.

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?

The description is a single, clear sentence that efficiently conveys the core function without any wasted words. It's front-loaded with the essential information, making it easy for an agent to parse quickly. This is an excellent example of conciseness.

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?

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is minimally adequate. It states what the tool does but lacks details on usage, behavior, or output. Without annotations or an output schema, more context would be helpful, but it meets a basic threshold for a simple read operation.

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?

The input schema has 100% description coverage, clearly documenting both parameters ('database' as optional with default, 'table' as required). The description adds no additional meaning beyond this, such as examples or constraints not in the schema. Given the high schema coverage, a baseline score of 3 is appropriate, as the schema does the heavy lifting.

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 clearly states the tool's purpose with a specific verb ('Show') and resource ('schema for a specific table'), making it easy to understand what it does. However, it doesn't explicitly differentiate from sibling tools like 'list_tables' (which might list table names without schemas) or 'execute_query' (which could return data rather than metadata), so it falls short of a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'list_tables' (for listing tables) or 'execute_query' (for querying data), nor does it specify prerequisites or contexts for usage. This leaves the agent with minimal direction on tool selection.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Himanshu-Agg12/mcp-mysql-lens'

If you have feedback or need assistance with the MCP directory API, please join our Discord server