Skip to main content
Glama

add_dynamic_topn

Create a dynamic Top N filter with a what-if slider and an Others bucket for all items beyond the selected rank.

Instructions

Generate a dynamic Top N: a what-if N slider, a UNION+Others dimension table, and a rank-or-others measure that buckets everything below rank N into an Others row.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nMaxNomaximum N (default 20)
nMinNominimum N (default 1)
measureYesthe measure to rank on
nDefaultNodefault N (optional)
dimensionYesdimension column as Table[Column]
homeTableYeshome table for the measure
sessionIdYes
nIncrementNoN increment (default 1)
othersLabelNolabel for the Others bucket (default Others)
topNTableNameNoname for the Top N dimension table (optional)
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the generated components and bucketing logic, but does not mention side effects on the model, reversibility, or required permissions. The description adds meaningful context but leaves some behavioral aspects implicit.

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 a single dense sentence that front-loads the tool's purpose and generated artifacts without wasted words. It is concise yet highly informative.

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?

Given the tool's complexity (10 parameters) and lack of output schema, the description conveys the core concept and generated artifacts well. It does not fully explain return values or side effects, but the essential purpose is clear enough for an agent to select and invoke correctly.

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 90%, so the schema documents most parameters. The description does not add details about individual parameters (e.g., nMin, nMax, othersLabel) beyond what is already in the schema, making baseline 3 appropriate.

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 uses a specific verb ('Generate') and names distinct artifacts (what-if N slider, UNION+Others dimension table, rank-or-others measure), clearly differentiating it from siblings like add_topn_filter or add_visual_topn. It precisely captures the tool's unique value.

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 description implies a clear use case (dynamic top N with an interactive slider and Others bucket) but does not explicitly mention alternatives or exclusions. It provides sufficient context for an agent to know when to use it, just lacks explicit comparison.

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/cyphonica/powerbi-pbix-mcp'

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