Skip to main content
Glama
ajkeast

My Coding Buddy MCP Server

by ajkeast

get_table_create

Retrieve the DDL CREATE TABLE statement for a specific table by providing its name.

Instructions

Get the CREATE TABLE statement for a specific table.

Args: table_name (str): Table name to inspect

Returns: str: The DDL statement used to create the table

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
table_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler method that executes the 'get_table_create' tool logic. It connects to the database, executes SHOW CREATE TABLE, and returns the DDL statement.
    def get_table_create(self, table_name: str) -> str:
        """Get the CREATE TABLE statement for a specific table.
        
        Args:
            table_name (str): Table name to inspect
        
        Returns:
            str: The DDL statement used to create the table
        """
        with self.get_connection() as conn:
            cursor = conn.cursor()
            cursor.execute(f"SHOW CREATE TABLE `{table_name}`")
            row = cursor.fetchone()
    
            if not row:
                return f"No CREATE TABLE information found for '{table_name}'"
    
            return row[1]
  • server.py:18-18 (registration)
    Registration of get_table_create as an MCP tool via the FastMCP server.
    mcp.tool()(sql_tools.get_table_create)
Behavior3/5

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

No annotations, description notes it returns DDL statement. Does not explicitly state it's read-only or require permissions, but it's implicit. Minimal disclosure beyond basic purpose.

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

Conciseness4/5

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

Description is short and includes a docstring format. Front-loaded with main sentence. No unnecessary 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?

Output schema exists so return details are less critical. However, could mention if only works for tables (not views) or any limitations. Adequate but not thorough.

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?

Only one parameter, schema has no description (0% coverage). Description adds 'Table name to inspect', but adds little beyond the schema's title. Should provide more context like required format or examples.

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?

Description clearly states verb 'get' and resource 'CREATE TABLE statement for a specific table'. Differentiates from siblings like get_table_schema.

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?

No explicit when-to-use or exclusion guidelines. Usage is implied by the tool's purpose but could compare with siblings like get_table_schema.

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/ajkeast/Coding-Buddy-MCP-Server'

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