Skip to main content
Glama
blitzstermayank

Teradata MCP Server

base_tableList

Lists all tables in a specified Teradata database to help users discover available data structures and plan queries.

Instructions

Lists all tables in a database.

Arguments: database_name - Database name

Returns: ResponseType: formatted response with query results + metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
database_nameNo

Implementation Reference

  • The handler function that executes the base_tableList tool. It queries dbc.TablesV for tables (T,V,O,Q kinds), optionally filtered by database_name, formats results with metadata.
    def handle_base_tableList(conn: TeradataConnection, database_name: str | None = None, *args, **kwargs):
        """
        Lists all tables in a database.
    
        Arguments:
          database_name - Database name
    
        Returns:
          ResponseType: formatted response with query results + metadata
        """
        logger.debug(f"Tool: handle_base_tableList: Args: database_name: {database_name}")
    
        sql = "select TableName from dbc.TablesV tv where tv.TableKind in ('T','V', 'O', 'Q')"
        params = []
    
        if database_name:
            sql += " and UPPER(tv.DatabaseName) = UPPER(?)"
            params.append(database_name)
    
        with conn.cursor() as cur:
            rows = cur.execute(sql, params)
            data = rows_to_json(cur.description, rows.fetchall())
            metadata = {
                "tool_name": "base_tableList",
                "sql": sql.replace("?", f"'{database_name}'"),
                "columns": [
                    {"name": col[0], "type": col[1].__name__ if hasattr(col[1], '__name__') else str(col[1])}
                    for col in cur.description
                ] if cur.description else [],
                "row_count": len(data)
            }
            logger.debug(f"Tool: handle_base_tableList: metadata: {metadata}")
            return create_response(data, metadata)
  • Dynamic registration loop that discovers handle_* functions from loaded modules, extracts tool_name by stripping 'handle_', wraps the function, and registers it as an MCP tool if matching profile config.
    for name, func in all_functions.items():
        if not (inspect.isfunction(func) and name.startswith("handle_")):
            continue
        tool_name = name[len("handle_"):]
        if not any(re.match(p, tool_name) for p in config.get('tool', [])):
            continue
        wrapped = make_tool_wrapper(func)
        mcp.tool(name=tool_name, description=wrapped.__doc__)(wrapped)
        logger.info(f"Created tool: {tool_name}")
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 mentions the return format ('formatted response with query results + metadata'), which adds some behavioral context. However, it lacks details on permissions, rate limits, or whether it's read-only (implied but not explicit), leaving significant gaps for a tool with no annotation coverage.

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 front-loaded with the core purpose, but includes redundant sections ('Arguments:', 'Returns:') that repeat information without adding value. It is concise in length but could be more streamlined by integrating parameter and return details into a single coherent sentence.

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 annotations, 0% schema coverage, and no output schema, the description is incomplete. It covers the basic purpose and return format but misses parameter semantics, usage context, and detailed behavioral traits. For a tool with such sparse structured data, more comprehensive guidance is needed.

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%, so the description must compensate. It lists 'database_name' as an argument but provides no semantic details (e.g., format, examples, or that it's optional with a default of null). This minimal information is insufficient to bridge the coverage gap, warranting a low score.

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: 'Lists all tables in a database.' It specifies the verb ('Lists') and resource ('tables in a database'), making the function unambiguous. However, it does not differentiate from sibling tools like 'base_databaseList' or 'dba_tableSqlList', which prevents a score of 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. With siblings like 'base_databaseList' (lists databases) and 'dba_tableSqlList' (likely lists SQL for tables), there is no indication of when this specific table-listing tool is preferred, leaving usage context unclear.

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