Skip to main content
Glama
blitzstermayank

Teradata MCP Server

qlty_distinctCategories

Extract unique values from a specific column in a Teradata database table to analyze data categories and identify distinct entries for quality assessment.

Instructions

Get the destinct categories from column in a table.

Arguments: database_name - name of the database table_name - table name to analyze column_name - column name to analyze

Returns: ResponseType: formatted response with query results + metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
database_nameYes
table_nameYes
column_nameYes

Implementation Reference

  • The main handler function for the 'qlty_distinctCategories' tool. It connects to Teradata, executes TD_CategoricalSummary on the specified table and column to retrieve distinct categories, formats the results into JSON, adds metadata, and returns a response.
    def handle_qlty_distinctCategories(
        conn: TeradataConnection,
        database_name: str | None,
        table_name: str,
        column_name: str,
        *args,
        **kwargs
    ):
        """
        Get the destinct categories from column in a table.
    
        Arguments:
          database_name - name of the database
          table_name - table name to analyze
          column_name - column name to analyze
    
        Returns:
          ResponseType: formatted response with query results + metadata
        """
        logger.debug(f"Tool: handle_qlty_distinctCategories: Args: table_name: {database_name}.{table_name}, column_name: {column_name}")
    
        if database_name is not None:
                table_name = f"{database_name}.{table_name}"
        with conn.cursor() as cur:
            rows = cur.execute(f"select * from TD_CategoricalSummary ( on {table_name} as InputTable using TargetColumns ('{column_name}')) as dt")
            data = rows_to_json(cur.description, rows.fetchall())
            metadata = {
                "tool_name": "qlty_distinctCategories",
                "database_name": database_name,
                "table_name": table_name,
                "column_name": column_name,
                "distinct_categories": len(data)
            }
            logger.debug(f"Tool: handle_qlty_distinctCategories: 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. It states the tool returns 'formatted response with query results + metadata,' which hints at output structure but lacks details on performance (e.g., execution time for large datasets), side effects (e.g., read-only vs. write operations), or error handling. For a tool with no annotation coverage, this is insufficient to inform safe and effective use.

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 brief and structured with clear sections for arguments and returns, making it easy to scan. However, it includes a spelling error ('destinct') and could be more front-loaded by emphasizing the core purpose earlier. Overall, it is efficient but not perfectly polished.

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 tool's complexity (data analysis with 3 parameters), lack of annotations, 0% schema description coverage, and no output schema, the description is incomplete. It does not explain the return format in detail, potential limitations (e.g., handling of null values), or how it differs from similar tools. This leaves significant gaps for an agent to understand and use the tool effectively.

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%, meaning the input schema provides no descriptions for the three parameters. The description lists the parameters (database_name, table_name, column_name) but does not add meaningful semantics beyond their names, such as expected formats, constraints, or examples. This fails to compensate for the lack of schema documentation, leaving parameters poorly understood.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool 'Get[s] the destinct categories from column in a table,' which clearly indicates its purpose as a data analysis operation. However, it contains a spelling error ('destinct' instead of 'distinct'), and while it differentiates from some siblings (e.g., qlty_columnSummary, qlty_univariateStatistics), it does not explicitly distinguish from others like base_columnDescription or base_tablePreview, which might involve similar column-level operations.

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 does not mention any prerequisites, such as needing the database to be accessible, or compare it to sibling tools like qlty_columnSummary or base_columnDescription that might offer overlapping functionality. This leaves the agent without context for tool selection.

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