Skip to main content
Glama
cemalturkcan

MariaDB MCP Server

by cemalturkcan

list_tables

Retrieve all tables for a given database connection. Specify the connection and optional database to list available tables.

Instructions

Lists tables for the selected connection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
connectionYes
databaseNo

Implementation Reference

  • The handler that executes the 'list_tables' tool logic. It takes a 'connection' (required) and optional 'database' argument, runs 'SHOW TABLES' (or 'SHOW TABLES FROM `database`') via the database manager, and returns the result.
    case "list_tables": {
      const { connection, database } = args || {};
      if (!connection) return fail("'connection' field is required.");
      const sql = database
        ? `SHOW TABLES FROM \`${database}\``
        : "SHOW TABLES";
      const rows = await db.runReadOnly(connection, sql);
      return ok(rows);
    }
  • The input schema definition for the 'list_tables' tool, specifying 'connection' (required, enum from readableConnections) and 'database' (optional string).
    {
      name: "list_tables",
      description: "Lists tables for the selected connection.",
      inputSchema: {
        type: "object",
        properties: {
          connection: { type: "string", enum: readableConnections },
          database: { type: "string" },
        },
        required: ["connection"],
      },
    },
  • src/index.js:31-37 (registration)
    The tool definitions are built by buildToolDefinitions() and returned in response to ListToolsRequestSchema, which effectively registers all tools (including 'list_tables') with the MCP server.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: buildToolDefinitions(
        readableConnections,
        writableConnections,
        allConnections,
      ),
    }));
Behavior2/5

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

No annotations are provided, so the description carries full burden. It only states the basic function with no details on output format, pagination, permissions, or side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise (one sentence) but lacks essential details. It is not sufficiently informative for an agent to use correctly.

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 output schema and no annotations, the description fails to specify what the tool returns (e.g., table names) or how to use the optional database parameter. It is incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description does not explain the 'database' parameter or clarify that 'connection' is limited to 'local'. More detail on parameters is needed.

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

Purpose5/5

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

The description clearly states the action (listing) and the resource (tables) with context (for selected connection). It is distinct from sibling tools like list_databases and list_connections.

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 guidance on when to use this tool versus alternatives such as describe_table or execute_select. No context on prerequisites or limitations.

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

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