Skip to main content
Glama
Teradata

Teradata MCP Server

Official
by Teradata

base_tableList

Retrieve a list of all tables within a Teradata database to identify available data structures for querying and analysis.

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 implements the base_tableList tool. It executes a SQL query to list tables (T, V, O, Q kinds) optionally filtered by database_name, formats results with metadata including the tool_name.
    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)
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 mentions the return format ('formatted response with query results + metadata'), it lacks critical details like whether this is a read-only operation, if it requires specific permissions, how it handles null database_name, or if there are rate limits. For a tool with zero annotation coverage, this is insufficient.

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 efficiently structured with a clear purpose statement followed by argument and return sections. Every sentence serves a purpose, though the return description could be slightly more specific about what 'metadata' includes. It's appropriately sized for a simple listing tool.

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 the lack of annotations and output schema, the description is incomplete for effective tool use. It doesn't explain behavioral aspects like safety (read-only vs. destructive), authentication needs, or error handling. While it covers the basic purpose and parameter, it misses critical context needed for an AI agent to use it reliably in a complex sibling environment.

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?

The description explicitly documents the single parameter ('database_name - Database name'), which is valuable since schema description coverage is 0%. However, it doesn't explain what happens when database_name is null (as allowed by the schema) or provide examples of valid database names. With only one parameter, the baseline is higher, but more context would be helpful.

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 a specific verb ('Lists') and resource ('tables in a database'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'base_databaseList' (which lists databases) or 'base_tableDDL' (which shows table definitions), missing an opportunity for clearer sibling distinction.

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_tablePreview' (for table content), 'base_tableDDL' (for table structure), and 'base_databaseList' (for databases), there's no indication of when this specific list operation is preferred, leaving the agent to guess based on tool names alone.

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/Teradata/teradata-mcp-server'

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