Skip to main content
Glama

get_unique_values

Lists unique values with frequencies for a column, sorted by count descending. Helps understand categorical columns and identify rare categories before encoding.

Instructions

List unique values with their frequencies for a column, sorted by count descending. Understand categorical columns before encoding. Reveals rare categories that may need grouping. Example: get_unique_values(column="CargoType", top_n=20)

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, the description carries full responsibility. It discloses that results are sorted by count descending and mentions the exploratory purpose. Missing are explicit statements about non-destructiveness, handling of missing values, or return format (though an output schema exists). The behavioral information is minimal, likely insufficient for an agent to fully anticipate side effects.

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 two sentences plus an example, front-loading the core behavior. Every sentence adds value: the purpose, the use case, and a concrete invocation. No redundancy or fluff.

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?

For a simple exploration tool, the description covers the main purpose and usage. However, it omits mention of which dataframe the tool operates on (df_name) and does not address how it relates to get_value_counts, which is a closely related sibling. These gaps reduce completeness in the given context.

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

Parameters3/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 explains 'column' conceptually and demonstrates 'top_n' in the example, but 'df_name' is completely unexplained. The example clarifies the use of column and top_n, but the third parameter remains ambiguous.

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 clearly states the tool lists unique values with frequencies for a column, sorted by count descending. It is specific about the verb and resource. However, it does not differentiate itself from the sibling tool get_value_counts, which likely serves the same purpose, so it lacks explicit sibling differentiation.

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 provides context for when to use it ('Understand categorical columns before encoding') and suggests a downstream action ('Reveals rare categories that may need grouping'). However, it does not explicitly mention any alternative tools or exclusions, and the overlap with get_value_counts is not addressed.

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