Skip to main content
Glama

Countplot

countplot

Generate a saved count plot showing how often each value in a dataset column occurs, including categorical or low-cardinality numerical columns, with an optional top_n limit.

Instructions

Generate and save a count plot showing how often each value of a column occurs. Works for categorical columns and for numerical columns with few distinct values. Args: dataset_id (str): ID of the dataset. column_name (str): Column to count. top_n (int): Maximum number of values to show. Default is 20. Returns: dict: Dataset ID, column name, counts shown, and saved image filename.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "dataset_id": "<dataset_id>",
      "column_name": "<column_name>"
    },
    "name": "countplot"
  }
}

Input Schema

NameRequiredDescriptionDefault
top_nNo
dataset_idYes
column_nameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It usefully discloses a write side effect ('save') and describes the return dict contents (dataset ID, column name, counts shown, saved image filename). It omits where the image is saved, whether existing files are overwritten, and any size/permission constraints, leaving meaningful behavioral gaps.

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 structure is clean and front-loaded, with the core behavior stated first, followed by applicability, Args, and Returns. The Args block restates parameter types already present in the schema, which is mildly redundant but supports readability given the 0% schema coverage.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, and the description compensates by summarizing the return dict. Parameters are fully documented and applicability is stated. The main omission is operational detail about the saved image file (location, format, overwrite behavior), which an agent might need before invoking a file-writing tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/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, and it does: all three parameters are documented with types and meaning, including that top_n is the 'Maximum number of values to show' with a default of 20. Only minor gaps remain, such as what happens if top_n exceeds the distinct value count.

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 names a specific verb+resource: 'Generate and save a count plot showing how often each value of a column occurs', which tells an agent exactly what the tool produces. It does not explicitly differentiate itself from the sibling 'barplot', so it falls short of a 5, but the purpose is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives applicability context ('Works for categorical columns and for numerical columns with few distinct values'), which helps an agent decide when the tool fits the data. However, it names no alternatives and offers no exclusions, so the agent must infer on its own whether 'barplot' or 'analyze_categorical' is the better choice.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools