Skip to main content
Glama
t2hnd

Bakery Data MCP Server

by t2hnd

get_schema

Retrieve database schema details like table structures and column definitions to understand bakery POS data organization.

Instructions

Get the database schema information including table structures and column definitions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Implementation of the get_schema tool handler within the call_tool function. It retrieves database table schemas from sqlite_master, column information using PRAGMA table_info, and row counts for each table, then returns the structured schema information as JSON text content.
    elif name == "get_schema":
        # Get all table information
        cursor.execute("""
            SELECT name, sql FROM sqlite_master
            WHERE type='table'
            ORDER BY name
        """)
        tables = cursor.fetchall()
    
        schema_info = {
            "tables": {}
        }
    
        for table in tables:
            table_name = table["name"]
            schema_info["tables"][table_name] = {
                "create_sql": table["sql"]
            }
    
            # Get column info
            cursor.execute(f"PRAGMA table_info({table_name})")
            columns = cursor.fetchall()
            schema_info["tables"][table_name]["columns"] = columns
    
            # Get row count
            cursor.execute(f"SELECT COUNT(*) as count FROM {table_name}")
            row_count = cursor.fetchone()["count"]
            schema_info["tables"][table_name]["row_count"] = row_count
    
        return [TextContent(
            type="text",
            text=json.dumps(schema_info, ensure_ascii=False, indent=2)
        )]
  • Registration of the get_schema tool in the list_tools function, defining its name, description, and empty input schema (no parameters required).
    Tool(
        name="get_schema",
        description="Get the database schema information including table structures and column definitions.",
        inputSchema={
            "type": "object",
            "properties": {}
        }
    )
  • Input schema definition for the get_schema tool, specifying an empty object (no input parameters required).
    inputSchema={
        "type": "object",
        "properties": {}
    }
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 states what the tool returns but doesn't disclose behavioral traits like whether it's read-only (implied by 'Get'), performance characteristics, error conditions, authentication needs, or format of returned information.

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 front-loads the core purpose ('Get the database schema information') and adds specific details ('including table structures and column definitions') without any wasted words.

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?

For a 0-parameter tool with no annotations and no output schema, the description provides basic purpose but lacks important context. It doesn't explain what format the schema information is returned in, whether it's comprehensive or filtered, or how it relates to the database context implied by sibling tools.

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

Parameters4/5

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

With 0 parameters and 100% schema description coverage, the baseline is 4. The description appropriately doesn't discuss parameters since there are none, and the schema already fully documents the empty input structure.

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 specific verbs ('Get') and resources ('database schema information including table structures and column definitions'). It distinguishes from siblings like execute_sql (which executes queries) or query_* tools (which query specific data), but doesn't explicitly mention these distinctions.

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 is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites, timing considerations, or compare it to sibling tools like execute_sql for schema exploration versus data querying.

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/t2hnd/bakery_data_mcp'

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