Skip to main content
Glama
blitzstermayank

Teradata MCP Server

plot_pie_chart

Generate a pie chart visualization from Teradata database tables by specifying labels and a data column to plot proportional values.

Instructions

Function to generate a pie chart plot for labels and columns. Columns mentioned in labels are used as labels and column is used to plot.

PARAMETERS: table_name: Required Argument. Specifies the name of the table to generate the donut plot. Types: str

labels:
    Required Argument.
    Specifies the labels to be used for the line plot.
    Types: str

column:
    Required Argument.
    Specifies the column to be used for generating the line plot.
    Types: str

RETURNS: dict

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
table_nameYes
labelsYes
columnYes

Implementation Reference

  • Handler function implementing the plot_pie_chart tool. It queries the specified Teradata table for labels and column data, validates inputs, and returns formatted JSON data suitable for rendering a pie chart using Chart.js via the shared get_plot_json_data helper.
    def handle_plot_pie_chart(conn: TeradataConnection, table_name: str, labels: str, column: str):
        """
        Function to generate a pie chart plot for labels and columns.
        Columns mentioned in labels are used as labels and column is used to plot.
    
        PARAMETERS:
            table_name:
                Required Argument.
                Specifies the name of the table to generate the donut plot.
                Types: str
    
            labels:
                Required Argument.
                Specifies the labels to be used for the line plot.
                Types: str
    
            column:
                Required Argument.
                Specifies the column to be used for generating the line plot.
                Types: str
    
        RETURNS:
            dict
        """
        if not isinstance(labels, str):
            raise ValueError("labels must be a string representing the column name for x-axis.")
    
        return get_plot_json_data(conn, table_name, labels, column, 'pie')
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 generating a plot but doesn't disclose behavioral traits such as whether it creates a file, displays the chart, returns an image or data, error handling, or performance considerations. The description is minimal and lacks details on what the tool actually does beyond the basic action.

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 structured with sections for function, parameters, and returns, which is organized. However, it's somewhat inefficient: the first sentence is redundant with the tool name, and parameter descriptions are brief but could be more front-loaded. It's concise but under-specified, not overly verbose.

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 3 parameters with 0% schema coverage, no annotations, and no output schema, the description is incomplete. It lacks details on what the tool returns (only says 'dict' without explanation), how it behaves, or error cases. For a data visualization tool with multiple parameters, this is inadequate to guide an AI agent 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%, so the description must compensate. It lists parameters in a PARAMETERS section but provides minimal semantics: table_name specifies the table, labels are used as labels, and column is used to plot. This adds some meaning but is vague (e.g., what format for labels? How does column relate to labels?). It doesn't fully explain the 3 parameters' roles or interactions, leaving gaps.

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 generates a pie chart plot for labels and columns, which gives a basic purpose. However, it's vague about what 'labels and columns' refer to (data fields?), doesn't specify the exact resource (data visualization from a table), and doesn't clearly distinguish from sibling tools like plot_line_chart or plot_polar_chart beyond mentioning 'pie chart' vs 'line plot' in parameter descriptions.

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?

No explicit guidance on when to use this tool versus alternatives like plot_line_chart or other charting tools. The description implies usage for generating pie charts but doesn't specify scenarios (e.g., for categorical data comparison) or exclusions. It's missing context on prerequisites or when-not-to-use information.

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