Skip to main content
Glama

get_value_counts

Analyze categorical column frequencies with counts, percentages, and cumulative percentages, sorted descending. Optionally limit to top N values for quick insights.

Instructions

Value counts with percentages, sorted descending. Shows top_n values. Detailed frequency analysis with percentages and cumulative percentages. More detailed than plot_bar. Example: get_value_counts(column="City", top_n=10)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
top_nNo
columnYes
df_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description must carry the behavioral disclosure burden. It discloses sort order, percentage inclusion, cumulative percentages, and top_n limiting, but it does not mention the return format, default dataframe behavior, or how missing values are handled. This is moderate transparency, not complete.

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 three sentences plus an example, stays on-topic, and front-loads the core behavior. Some redundancy exists ('Detailed frequency analysis' restates the first sentence), but the example and comparison add value without excessive length.

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

Completeness3/5

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

The tool is straightforward and an output schema exists, so the description does not need to explain return fields. However, the df_name parameter is not explained, and the relationship to the current dataframe context is absent. This leaves a nontrivial gap, though the core function is otherwise described.

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 clarifies column and top_n via the example and the 'Shows top_n values' phrase, but df_name is completely omitted, leaving an important parameter (the dataframe identifier) unexplained. This partial coverage is insufficient.

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

Purpose5/5

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

The description clearly identifies the tool as one that computes value counts with percentages and cumulative percentages, sorted descending. It explicitly contrasts with plot_bar ('More detailed than plot_bar'), which differentiates it from a key sibling and makes its purpose unambiguous.

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

Usage Guidelines4/5

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

The tool's context is clear: it is for detailed frequency analysis rather than a quick plot. It names plot_bar as an alternative and claims to be more detailed, but it does not enumerate other contexts where a different tool would be preferred, so it misses explicit exclusions.

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/AstyanM/mcp-data-science'

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