Skip to main content
Glama

rank_countries_by_customers

Rank countries by customer count using phone-number prefixes. Returns country code, name, and total, sorted highest first.

Instructions

Rank countries by number of customers, highest first. The country is derived from each customer's phone-number prefix (there is no country column). Returns a list of {country_code, country_name, customer_count}. limit defaults to 100 and is clamped to a maximum of 1000.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
Behavior4/5

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

The description discloses meaningful behavior beyond a bare summary: countries are derived from phone-number prefixes, there is no country column, results are returned as {country_code, country_name, customer_count}, and the limit has both a default and a maximum clamp. This is especially valuable because no annotations are provided. It does not explicitly state read-only behavior, but that is strongly implied for a ranking operation.

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 compact and every sentence earns its place: the operation, the derived-country caveat, the return shape, and the limit behavior are all included without filler. It is front-loaded with the action and directly clarified important nuances immediately.

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?

For a simple read-style ranking tool with no output schema, the description is largely complete: it explains the ranking, the derivation logic, the returned fields, and the parameter behavior. It is slightly incomplete only in not explicitly addressing potential ambiguity with a similarly named sibling or clarifying whether the result includes all countries above a zero threshold.

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?

The only parameter, limit, receives no schema description, so the description must carry the parameter semantics. The description covers this well: it explains the default (100) and the maximum clamp (1000), which is information not present in the input schema beyond the parameter name and nullability.

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 a specific action: ranking countries by customer count in descending order. It also makes the unusual derivation explicit (country comes from phone-number prefix, not a country column). However, it does not explicitly differentiate from sibling tool count_customers_by_country, so the agent may not know which tool to choose when the sibling name is available.

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 intended use is implied by the description: use this tool when you need a ranked list of countries by customer count. However, the description gives no explicit guidance about when to choose this tool over similar sibling tools like count_customers_by_country, nor does it state any exclusions or alternative conditions.

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/ablinovsibset-spec/internet-shop-mcp'

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