Skip to main content
Glama
moosin76

MariaDB Reader MCP Server

by moosin76

get_table_schema

Extract the schema and column definitions of a specified table from a MariaDB database using the MariaDB Reader MCP Server for efficient database exploration and analysis.

Instructions

특정 테이블의 스키마(컬럼 정의)를 가져옵니다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
databaseYes데이터베이스의 이름입니다.
tableYes테이블의 이름입니다.

Implementation Reference

  • Executes the get_table_schema tool: extracts database and table names, validates parameters, creates DB connection, runs DESCRIBE query to fetch schema, and returns JSON-formatted result.
    case "get_table_schema": {
      const dbName = args.database as string; // 데이터베이스 이름 추출
      const tableName = args.table as string; // 테이블 이름 추출
      if (!dbName) throw new McpError(ErrorCode.InvalidParams, "필수 파라미터 누락: database");
      if (!tableName) throw new McpError(ErrorCode.InvalidParams, "필수 파라미터 누락: table");
      connection = await createDbConnection(dbName); // 지정된 DB로 연결
      // 테이블 스키마 조회 쿼리 (예약어 또는 특수문자 가능성을 위해 백틱 사용)
      const [rows] = await connection.query(`DESCRIBE \`${tableName}\`;`);
      return { content: [{ type: "text", text: JSON.stringify(rows, null, 2) }] };
    }
  • Input schema for get_table_schema: requires 'database' and 'table' strings.
    inputSchema: {
      type: "object",
      properties: {
        database: { type: "string", description: "데이터베이스의 이름입니다." },
        table: { type: "string", description: "테이블의 이름입니다." }
      },
      required: ["database", "table"]
    }
  • src/index.ts:91-102 (registration)
    Tool registration in list_tools handler: defines name, description, and input schema for get_table_schema.
    {
      name: "get_table_schema",
      description: "특정 테이블의 스키마(컬럼 정의)를 가져옵니다.",
      inputSchema: {
        type: "object",
        properties: {
          database: { type: "string", description: "데이터베이스의 이름입니다." },
          table: { type: "string", description: "테이블의 이름입니다." }
        },
        required: ["database", "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. While it implies a read operation ('가져옵니다' - retrieves), it lacks details on permissions, rate limits, error handling, or response format. For a tool with no annotations, 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, efficient sentence that directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, making it easy for an agent 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 required parameters, no output schema) and high schema coverage, the description is minimally adequate. However, it lacks behavioral context (e.g., permissions, errors) and does not reference sibling tools, which could improve completeness for agent usage.

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 both parameters ('database' and 'table') clearly documented in the input schema. The description does not add any additional meaning beyond what the schema provides, such as format examples or constraints. Baseline 3 is appropriate when the schema handles parameter documentation effectively.

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: '특정 테이블의 스키마(컬럼 정의)를 가져옵니다' translates to 'Retrieves the schema (column definitions) of a specific table.' This specifies the verb ('가져옵니다' - retrieves) and resource ('스키마' - schema). However, it does not explicitly differentiate from sibling tools like 'list_tables' or 'query_table', which would require a 5.

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 does not mention sibling tools like 'list_databases', 'list_tables', or 'query_table', nor does it specify prerequisites or contexts for usage. This leaves the agent without explicit 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

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/moosin76/mcp_server_mariadb_reader'

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