Skip to main content
Glama
madhukarkumar

SingleStore MCP Server

describe_table

Retrieve detailed schema information for a specified table using SingleStore MCP Server. Ideal for understanding table structure, field types, and metadata.

Instructions

Get detailed information about a table

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYesName of the table to describe

Implementation Reference

  • Main handler implementation for the 'describe_table' tool. Validates input, queries DESCRIBE for schema, COUNT(*) for statistics, and SELECT LIMIT 5 for sample data, returns structured JSON response.
    case 'describe_table': {
      if (!request.params.arguments || typeof request.params.arguments.table !== 'string') {
        throw new McpError(
          ErrorCode.InvalidParams,
          'Table parameter must be a string'
        );
      }
    
      try {
        // Get table schema
        const [columns] = await conn.query(
          'DESCRIBE ??',
          [request.params.arguments.table]
        ) as [ColumnRowDataPacket[], mysql.FieldPacket[]];
    
        // Get basic table statistics
        const [stats] = await conn.query(
          'SELECT COUNT(*) as total_rows FROM ??',
          [request.params.arguments.table]
        ) as [mysql.RowDataPacket[], mysql.FieldPacket[]];
    
        // Sample some data
        const [sample] = await conn.query(
          'SELECT * FROM ?? LIMIT 5',
          [request.params.arguments.table]
        ) as [mysql.RowDataPacket[], mysql.FieldPacket[]];
    
        const statistics = stats[0] as { total_rows: number };
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(
                {
                  schema: columns,
                  statistics,
                  sample_data: sample,
                },
                null,
                2
              ),
            },
          ],
        };
      } catch (error: unknown) {
        const err = error as Error;
        throw new McpError(
          ErrorCode.InternalError,
          `Table description error: ${err.message}`
        );
      }
    }
  • src/index.ts:1210-1222 (registration)
    Tool registration including name, description, and input schema in the MCP server's ListTools response.
      name: 'describe_table',
      description: 'Get detailed information about a table',
      inputSchema: {
        type: 'object',
        properties: {
          table: {
            type: 'string',
            description: 'Name of the table to describe',
          },
        },
        required: ['table'],
      },
    },
  • Input schema definition for the 'describe_table' tool requiring a 'table' string parameter.
      inputSchema: {
        type: 'object',
        properties: {
          table: {
            type: 'string',
            description: 'Name of the table to describe',
          },
        },
        required: ['table'],
      },
    },
  • Type interface used in the describe_table handler for typing DESCRIBE query results.
    interface ColumnRowDataPacket extends mysql.RowDataPacket {
      Field: string;
      Type: string;
      Null: string;
      Key: string;
      Default?: string;
      Extra?: string;
    }
  • src/index.ts:170-182 (registration)
    Secondary tool registration in SSE handleRequest cached tools list (identical schema).
      name: 'describe_table',
      description: 'Get detailed information about a table',
      inputSchema: {
        type: 'object',
        properties: {
          table: {
            type: 'string',
            description: 'Name of the table to describe',
          },
        },
        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 action ('Get detailed information') but doesn't describe what 'detailed information' includes (e.g., schema, columns, constraints), whether it requires specific permissions, or how errors are handled. For a tool with no annotations, this leaves significant gaps in understanding its behavior.

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, efficient sentence with zero waste. It's front-loaded with the core purpose ('Get detailed information about a table'), making it easy to parse quickly. Every word earns its place, and there's no unnecessary elaboration.

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 no annotations and no output schema, the description is incomplete for a tool that likely returns complex metadata. It doesn't explain what 'detailed information' entails (e.g., column types, indexes), leaving the agent uncertain about the return value. For a tool with such contextual gaps, more detail is needed to be fully helpful.

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, with the 'table' parameter clearly documented as 'Name of the table to describe'. The description doesn't add any meaning beyond this, such as format examples or constraints. With high schema coverage, the 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 verb ('Get') and resource ('detailed information about a table'), making the purpose immediately understandable. It distinguishes from siblings like 'list_tables' (which lists tables) and 'query_table' (which queries data), though it doesn't explicitly differentiate them. The description is specific but lacks explicit sibling differentiation for 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 when to use 'describe_table' instead of 'list_tables' (for metadata vs. listing) or 'query_table' (for data vs. structure), nor does it specify prerequisites like needing an existing table. Usage is implied from the name but not explicitly stated.

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

Related 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/madhukarkumar/singlestore-mcp-server'

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