Skip to main content
Glama

Fetch open data

fetch_dataset
Read-onlyIdempotent

Real numbers for a data story, never from memory: open data (World Bank, SCB, Eurostat, Our World in Data) and their own channel's statistics. Returns a preview and a ref for the story.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "fetch_dataset"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoLast year.
topNoHow many series by last value (default 12, at most 60; for a map leave it out — every region, up to 250).
fromNoFirst year.
pickNoSeries to keep: country or kommun names (any language) or ISO codes.
queryYesWhat the story is about, in the person's words: 'Sveriges befolkning sedan 1960', 'CO2 per person i Norden'.
regionNo
datasetNoA dataset id from an earlier answer when you already know which one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "http://json-schema.org/draft-07/schema#",
      -  "additionalProperties": false,
      -  "properties": {
      -    "candidates": {
      -      "items": {
      -        "additionalProperties": {},
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "catalogue": {
      -      "items": {
      -        "additionalProperties": {},
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "dataset": {
      -      "type": "string"
      -    },
      -    "error": {
      -      "type": "string"
      -    },
      -    "keys": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "from": {
      -          "type": "number"
      -        },
      -        "n": {
      -          "type": "number"
      -        },
      -        "to": {
      -          "type": "number"
      -        }
      -      },
      -      "required": [
      -        "from",
      -        "to",
      -        "n"
      -      ],
      -      "type": "object"
      -    },
      -    "name": {
      -      "type": "string"
      -    },
      -    "ref": {
      -      "additionalProperties": {},
      -      "type": "object"
      -    },
      -    "series": {
      -      "items": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "first": {},
      -          "id": {
      -            "type": "string"
      -          },
      -          "label": {
      -            "type": "string"
      -          },
      -          "last": {}
      -        },
      -        "required": [
      -          "id",
      -          "label"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "source": {
      -      "additionalProperties": {},
      -      "type": "object"
      -    },
      -    "tell": {
      -      "type": "string"
      -    },
      -    "unit": {
      -      "type": "string"
      -    }
      -  },
      -  "type": "object"
      -}New value: +null
  2. Changed2 schema fields changed
    • changedInput schema / properties / pick / maxItems
      Previous value: -60New value: +250
    • changedInput schema / properties / top / description
      Previous value: -"How many series by last value (default 12, at most 60)."New value: +"How many series by last value (default 12, at most 60; for a map leave it out — every region, up to 250)."
  3. Added

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the safety profile is covered. The description adds genuine extra context — external data sources spanning open-data providers and the user's own channel, plus the return of a preview and a `ref` — which matters because there is no output schema. It stops short of describing limits, data freshness, or what happens when a query returns nothing.

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?

Two sentences, front-loaded with the core constraint ('never from memory') and followed by the return contract. Slight rhetorical padding in 'Real numbers for a data story', but it earns its place by stating the grounding requirement, and there is no redundant restatement of the name.

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 7-parameter read-only retrieval tool with no output schema, the definition covers the essentials: source domain, the preview-plus-ref return shape, and the grounding purpose. What remains thin is the interplay between free-text `query` and explicit `dataset`, and the absence of guidance on empty or ambiguous results.

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 86%, so the schema already explains query, dataset, pick, top, from and to in useful detail. The description only gestures at parameter meaning by naming data sources, adding nothing about how `query` is interpreted or how `dataset` narrows a search. Baseline 3 is appropriate when the schema does nearly all the work.

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 identifies the resource precisely: open statistical data from named providers (World Bank, SCB, Eurostat, Our World in Data) plus the caller's own channel statistics. The verb is implicit rather than stated ('Fetch open data' only appears in the title), but an agent can tell this is a statistical-data retrieval tool and not one of the many social/planning siblings.

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 phrase 'Real numbers for a data story, never from memory' implies the condition for use: grounding a story or claim in actual figures rather than generating them. However, no alternative is named — siblings like fetch, search, or create_data_story are not positioned relative to this tool, so the agent must infer when this differs from a generic fetch or search.

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.