Skip to main content
Glama

compare_entities

Read-onlyIdempotent

Compare ONE indicator across MULTIPLE entities (e.g. World Bank GDP of DEU vs USA vs CHN, or a FRED / Eurostat / OECD series across countries). BY DEFAULT returns a per-entity summary (first/latest/min/max/avg/count) | enough to say who is highest and how current levels compare | plus row_count + x_range. Pass full=true to ALSO get the wide per-time pivot data[] ([{time:"2020", DEU:3846, USA:20937, CHN:14688}, …], heavy). Use this for country comparisons, cross-region analyses, or any chart that compares the same metric across entities. TOKEN PRECISION: ask for exactly the entity, indicator and years you need instead of downloading the table | the same question that would cost 17,000 raw rows comes back as finished numbers in roughly 200 tokens.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fullNoReturn the full raw time series (heavy, many tokens). Default false → you get only the summary/stats, which is enough to ANSWER a question. Set true only when you must plot or export every point.
timeNoOptional time range: "2010-2023" or "2020"
formatNoOutput wire format for this MCP call. Default 'toon' (Token-Oriented Notation, fewest tokens, best for tabular rows). 'compact' = minified JSON. 'json' = pretty JSON for readability. The REST API always returns JSON regardless.
entitiesYesEntity codes to compare (max 50). E.g. ["DEU","USA","CHN"]
indicatorYesIndicator ID to compare. Get from list_indicators.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / format / description
      Previous value: -"Output wire format. 'compact' (default) = minified JSON, token-efficient. 'json' = pretty JSON for readability. 'toon' = Token-Oriented Notation, fewest tokens for tabular rows."New value: +"Output wire format for this MCP call. Default 'toon' (Token-Oriented Notation, fewest tokens, best for tabular rows). 'compact' = minified JSON. 'json' = pretty JSON for readability. The REST API always returns JSON regardless."
    • changedInput schema / properties / format / enum
      Previous value: -[
      -  "compact",
      -  "json",
      -  "toon"
      -]New value: +[
      +  "toon",
      +  "compact",
      +  "json"
      +]
  2. Changed1 schema field changed
    • addedInput schema / properties / format
      Added value: +{
      +  "description": "Output wire format. 'compact' (default) = minified JSON, token-efficient. 'json' = pretty JSON for readability. 'toon' = Token-Oriented Notation, fewest tokens for tabular rows.",
      +  "enum": [
      +    "compact",
      +    "json",
      +    "toon"
      +  ],
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • addedInput schema / properties / full
      Added value: +{
      +  "description": "Return the full raw time series (heavy, many tokens). Default false → you get only the summary/stats, which is enough to ANSWER a question. Set true only when you must plot or export every point.",
      +  "type": "boolean"
      +}
  4. First observed

TDQS

A4.5/5.0
Behavior5/5

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

The description adds substantial behavioral context beyond the annotations: the default per-entity summary behavior, the optional full pivot output, the heaviness of full=true, and token-cost implications. Since annotations already mark this as read-only and idempotent, the description's extra detail about output shape and cost is valuable and non-redundant.

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?

The description is dense and front-loaded with the core purpose, then covers the output default, the full-mode variant, use cases, and token precision. It is longer than minimal but every sentence carries useful information, and the examples make it more scannable.

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 has no output schema, the description does a good job of explaining the return shape (summary stats vs. wide pivot rows) and the tradeoff of using full=true. It covers core behavioral expectations; it could be slightly more complete by noting edge cases like missing data or unsupported indicators, but nothing essential is missing for correct invocation.

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 coverage is 100%, so the baseline is 3. The description adds meaning by explaining what the default output looks like, when full should be set to true, and how the summary statistics (first/latest/min/max/avg/count) support comparative answers. This goes beyond the schema's property descriptions.

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 clearly states the tool's specific function: comparing ONE indicator across MULTIPLE entities, with concrete examples (GDP of DEU vs USA vs CHN). This distinguishes it from sibling tools like get_entity_data or correlate, which serve different analytical purposes.

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 explicitly states when to use this tool: 'Use this for country comparisons, cross-region analyses, or any chart that compares the same metric across entities.' It also explains when to use the full parameter. However, it does not explicitly name alternative tools or provide when-not-to-use guidance, 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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources