Skip to main content
Glama
blitzstermayank

Teradata MCP Server

base_tableDDL

Retrieve the Data Definition Language (DDL) for a Teradata table to view its structure and schema definition. This tool displays the complete SQL statement used to create or alter the table.

Instructions

Displays the DDL definition of a table via SQLAlchemy, bind parameters if provided (prepared SQL), and return the fully rendered SQL (with literals) in metadata.

Arguments: database_name - Database name table_name - table name

Returns: ResponseType: formatted response with query results + metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
database_nameYes
table_nameYes

Implementation Reference

  • Handler function that implements the base_tableDDL tool by executing 'SHOW TABLE' command on the Teradata connection and formatting the results with metadata.
    def handle_base_tableDDL(conn: TeradataConnection, database_name: str | None, table_name: str, *args, **kwargs):
        """
        Displays the DDL definition of a table via SQLAlchemy, bind parameters if provided (prepared SQL), and return the fully rendered SQL (with literals) in metadata.
    
        Arguments:
          database_name - Database name
          table_name - table name
    
        Returns:
          ResponseType: formatted response with query results + metadata
        """
        logger.debug(f"Tool: handle_base_tableDDL: Args: database_name: {database_name}, table_name: {table_name}")
    
        if database_name is not None:
            table_name = f"{database_name}.{table_name}"
        with conn.cursor() as cur:
            rows = cur.execute(f"show table {table_name}")
            data = rows_to_json(cur.description, rows.fetchall())
            metadata = {
                "tool_name": "base_tableDDL",
                "database": database_name,
                "table": table_name,
                "rows": len(data)
            }
            logger.debug(f"Tool: handle_base_tableDDL: metadata: {metadata}")
            return create_response(data, metadata)
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. It discloses that the tool 'displays' DDL and returns 'fully rendered SQL (with literals) in metadata,' implying a read-only operation. However, it lacks details on permissions, rate limits, error handling, or what 'metadata' includes. For a tool with zero annotation coverage, this is insufficient, scoring a 2 due to missing behavioral context.

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?

The description is front-loaded with the core purpose, followed by arguments and returns sections. It uses three sentences efficiently, with no wasted words. However, the 'Arguments' and 'Returns' labels could be integrated more smoothly, and some redundancy exists (e.g., 'via SQLAlchemy' and 'prepared SQL'), slightly reducing conciseness, hence a 4.

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 2 parameters, no annotations, and no output schema, the description is moderately complete. It covers the tool's purpose and parameters but lacks details on behavioral traits, error cases, or output structure. For a read-only tool with low complexity, this is adequate but has clear gaps, scoring a 3 as minimum viable.

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 0%, so the description must compensate. It lists the parameters (database_name and table_name) and their roles, adding meaning beyond the schema's generic titles. However, it doesn't explain format constraints (e.g., case sensitivity) or provide examples. With two parameters partially documented, this meets the baseline of 3 for marginal value over the schema.

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: 'Displays the DDL definition of a table via SQLAlchemy' and 'return the fully rendered SQL (with literals) in metadata.' It specifies the verb ('displays'), resource ('DDL definition of a table'), and method ('via SQLAlchemy'), distinguishing it from siblings like base_tableList or base_tablePreview. However, it doesn't explicitly differentiate from base_tableAffinity or base_tableUsage, which might also involve table metadata, keeping it at a 4 rather than 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 mentions 'bind parameters if provided' but doesn't specify scenarios or prerequisites, such as when DDL is needed versus other table-related tools like base_tablePreview for data viewing. Without explicit when/when-not instructions or named alternatives, this scores a 2.

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/blitzstermayank/MCP'

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