Skip to main content
Glama

value_counts

Read-only

Analyze Excel columns by calculating frequency counts or proportions for each value, optionally limited to top N and excluding nulls.

Instructions

Return frequency counts for a column as counts or normalized proportions.

Args: file_path: Workbook path. sheet_name: Worksheet name. column: Column name to analyse. normalize: If True return proportions instead of raw counts. top_n: If provided, return only the top N values. dropna: Exclude nulls when True. has_header: Whether the sheet has a header row.

Returns: dict: {"column", "total_rows", "normalize", "counts": [{"value", "count"}, ...]}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
top_nNo
columnYes
dropnaNo
file_pathYes
normalizeNo
has_headerNo
sheet_nameYes
Behavior4/5

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

Annotations only declare readOnlyHint=true; the description goes further by documenting normalize behavior, top_n truncation, dropna exclusion, and the exact return dict structure. This gives the agent a clear picture of what to expect without contradicting the annotation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is formatted as a compact docstring with a one-line summary, an Args list, and a Returns section. No redundancy or filler; each parameter gets a single line of explanation.

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

Completeness5/5

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

There is no output schema, but the description provides the exact return type and structure. It covers all parameters, defaults, and behaviors (e.g., normalize when True, dropna, top_n). For a moderately complex tool, this is complete.

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

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, but the Args section in the tool description explains every parameter (file_path, sheet_name, column, normalize, top_n, dropna, has_header), including defaults and meaning. This fully compensates for the missing schema descriptions.

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 opens with a specific verb ('Return frequency counts for a column') and clearly states the resource and options (normalize, top_n, dropna). It is unambiguous, but it does not explicitly differentiate from sibling statistics tools like column_statistics or profile_data, so it misses the top score.

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?

The description explains what the tool does but provides no guidance on when to choose it over sibling tools such as column_statistics or aggregate_data. The use case is implied by the function name and description, but there are no explicit alternatives or 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/mbeps/excel-mcp'

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