Skip to main content
Glama
Atomzzm
by Atomzzm

describe_table

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

Instructions

Get table structure

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYesTable name

Implementation Reference

  • The handler function that executes the DESCRIBE SQL query to get the table structure.
    private async handleDescribeTable(args: any) {
      await this.ensureConnection();
    
      if (!args.table) {
        throw new McpError(ErrorCode.InvalidParams, 'Table name is required');
      }
    
      try {
        const [rows] = await this.connection!.query('DESCRIBE ??', [args.table]);
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(rows, null, 2),
            },
          ],
        };
      } catch (error) {
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to describe table: ${getErrorMessage(error)}`
        );
      }
    }
  • Input schema for the describe_table tool defining the required 'table' parameter.
    inputSchema: {
      type: 'object',
      properties: {
        table: {
          type: 'string',
          description: 'Table name',
        },
      },
      required: ['table'],
    },
  • src/index.ts:176-189 (registration)
    Registration of the describe_table tool in the ListTools response.
    {
      name: 'describe_table',
      description: 'Get table structure',
      inputSchema: {
        type: 'object',
        properties: {
          table: {
            type: 'string',
            description: 'Table name',
          },
        },
        required: ['table'],
      },
    },
  • src/index.ts:203-204 (registration)
    Registration and dispatch of describe_table in the CallToolRequest switch statement.
    case 'describe_table':
      return await this.handleDescribeTable(request.params.arguments);
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It implies a read-only operation ('Get') but doesn't disclose details like error handling (e.g., if the table doesn't exist), output format, permissions required, or side effects. More context is needed for a tool that interacts with a database.

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?

The description is very concise at three words, with no wasted language. It's front-loaded and to the point, though it could benefit from slightly more detail without losing efficiency. The brevity is appropriate but borders on under-specification.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a database tool with no annotations and no output schema, the description is incomplete. It doesn't explain what 'table structure' includes (e.g., schema details), potential errors, or the return format. For a tool that likely returns structured metadata, more context is needed to guide the agent effectively.

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%, with the single parameter 'table' documented as 'Table name' in the schema. The description adds no additional meaning beyond this, such as format examples or constraints. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get table structure' clearly indicates a read operation on a database table, which is better than a tautology. However, it lacks specificity about what 'structure' entails (e.g., columns, data types, constraints) and doesn't distinguish it from potential siblings like 'list_tables' (which might list names only) or 'query' (which retrieves data).

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?

No explicit guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a database connection via 'connect_db'), contrast with 'list_tables' (for names) or 'query' (for data), or specify use cases like schema inspection. Usage is implied by the name but not articulated.

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/Atomzzm/mcp-mysql-server'

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