Skip to main content
Glama
bretoreta

MariaDB MCP Server

by bretoreta

describe_table

Retrieve the schema for a MariaDB table to understand its structure, columns, and data types for database analysis or query planning.

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

  • Handler for the 'describe_table' tool: validates input, executes DESCRIBE query on the table (optionally using specified database), and returns the result rows as formatted JSON text.
    case "describe_table": {
      const tbl = args.table as string;
      if (!tbl)
        throw new McpError(ErrorCode.InvalidParams, "`table` is required");
      const db = args.database as string | undefined;
      const { rows } = await executeQuery(`DESCRIBE \`${tbl}\``, [], db);
      return {
        content: [{ type: "text", text: JSON.stringify(rows, null, 2) }],
      };
    }
  • src/index.ts:95-103 (registration)
    Registration of the 'describe_table' tool in the ListTools response, including name, description, and input schema definition.
    {
      name: "describe_table",
      description: "Show schema of a table",
      inputSchema: {
        type: "object",
        properties: { database: { type: "string" }, table: { type: "string" } },
        required: ["table"],
      },
    },
  • Input schema for the 'describe_table' tool defining required 'table' parameter and optional 'database'.
      inputSchema: {
        type: "object",
        properties: { database: { type: "string" }, table: { type: "string" } },
        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 schema information but lacks details on permissions needed, response format, error handling, or whether it's a read-only operation. This is inadequate for a tool with no annotation coverage.

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 with zero waste—it directly states the tool's function without unnecessary words. It is appropriately sized and front-loaded, making it easy to parse quickly.

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 low complexity (2 parameters, no output schema) and high schema coverage, the description is minimally adequate. However, it lacks output details and behavioral context, which are important since no annotations or output schema exist to compensate.

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%, so the input schema already documents both parameters ('database' as optional, 'table' as required). The description adds no additional meaning beyond what the schema provides, such as examples or constraints, meeting the baseline for high schema coverage.

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. It distinguishes from siblings like 'list_tables' (which lists table names) by focusing on schema details, though it doesn't explicitly mention this distinction.

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?

The description implies usage when schema information is needed, but provides no explicit guidance on when to use this tool versus alternatives like 'list_tables' or 'execute_query'. No prerequisites, exclusions, or context for tool selection are mentioned.

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/bretoreta/mariadb-mcp-server'

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