Skip to main content
Glama

count_customers_by_country

Counts customers by country from phone-number prefixes, returning customer totals per country. Filter by a country name or ISO code to get that country's count, with 0 when no customers exist.

Instructions

Count customers by country. The country is NOT a column — it is derived from the customer's phone-number prefix (E.164), so do not look for a country column. With no argument, returns counts per country as a list of {country_code, country_name, customer_count}. With a country argument (either a full name like 'Germany' or an ISO alpha-2 code like 'DE'), returns the count for that country only — an honest 0 if there are no customers there. An unknown country name returns an error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countryNo
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden, and it does this thoroughly. It discloses how countries are derived, the exact return shape, the 'honest 0' behavior for valid countries without customers, and the error condition for unknown country names.

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 front-loaded with the most important fact first: the country is not a literal column. Every sentence adds distinct value covering semantics, parameter behavior, output, zero-case handling, and errors.

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?

For a simple one-parameter tool with no output schema and no annotations, the description fully explains input semantics and output format. No essential detail is missing for an agent to correctly select and invoke the tool.

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?

Schema coverage is 0%, but the description more than compensates by explaining the only parameter's meaning: `country` may be absent/null, a full country name, or an ISO alpha-2 code. It also maps each form of the parameter to the resulting behavior.

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 states the specific action ('Count customers by country') and resource clearly, and it explicitly distinguishes the semantic scope by saying the country is derived from the E.164 phone-number prefix rather than being a column. This prevents confusion with table-oriented siblings such as list_tables and describe_table.

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 gives precise guidance for the two usage modes: no argument returns all country counts, and a country argument filters to one country. It also warns against the likely mistake of looking for a `country` column. It does not explicitly name alternatives like rank_countries_by_customers, so it stops short of a 5.

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