Skip to main content
Glama

Country Stats Facts

Compare countries

compare_countries
Read-onlyIdempotent

Use this when the user asks to compare or rank countries on one statistic, such as "compare GDP per capita for Germany, France and Italy" or "rank the Nordic countries by life expectancy". Pass 2 to 6 countries (names or ISO codes), the indicator, and optionally a year and an order. Returns the countries ranked with each value and year, any country without data, the source and the date it was last updated. Expand a group such as Nordic or G7 into its countries first; groups themselves are not accepted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yearNoA specific calendar year; leave out for the latest year with data
orderNodesc ranks the highest value first (default), asc the lowest first
countriesYesBetween 2 and 6 countries; a country named twice counts once
indicatorYespopulation, gdp, gdp_per_capita, gdp_growth, inflation, unemployment, life_expectancy and the other listed series

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
as_ofYes
orderYes
noticeYes
sourceYes
statusYes
messageNo
no_dataYes
rankingYes
indicatorYes
same_yearYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, so the safety profile is covered. The description adds genuinely new behavioral context beyond the annotations and output schema: countries lacking data are reported rather than silently dropped, and the source plus last-updated date are surfaced, signalling data freshness limits.

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

Conciseness4/5

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

A single dense paragraph that is front-loaded with the trigger condition and examples, then the inputs, then the return contents. Every sentence carries information, though the return-value summary is partially redundant with the existing output schema.

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?

An output schema exists, so return values need not be documented, yet the description still summarises ranking output, missing-data handling and provenance. Combined with annotations covering the safety profile and a fully documented schema, an agent has everything needed to invoke this tool correctly.

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?

Schema description coverage is 100%, so the baseline is 3; the schema already documents year, order, the indicator enum and the country item format. The description adds one piece of meaning not in the schema: group names must be manually expanded into member countries before calling, which is a real usage constraint on the 'countries' parameter.

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 a precise verb and resource ('compare or rank countries on one statistic') plus scope (2-6 countries, a single indicator, optional year/order), which distinguishes it from the sibling get_country_indicator, a single-country lookup. Two concrete example queries make the intended function unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit trigger conditions ('when the user asks to compare or rank countries on one statistic') with two representative user phrasings, and an explicit constraint that functions as a when-not: groups such as Nordic or G7 must be expanded first because 'groups themselves are not accepted'. Nothing essential is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources