Skip to main content
Glama

Faostat Data

faostat_data
Read-onlyIdempotent

Observations from a FAOSTAT domain, the actual numbers, with units, year and data-quality flag. AUTHORITATIVE for "how much did produce in ", world agricultural trade flows, fertiliser and pesticide use, agricultural emissions and food-balance data. Pass codes from faostat_dimensions: area (country), element (what is measured) and item (the commodity) are all numeric domain-specific codes, not names. Example: domain "QCL", area "231" (United States of America), element "5510" (production quantity), item "15" (wheat), years "2020,2021,2022". Answers keylessly from a stored copy of FAO's bulk files for QCL (crops and livestock production), FBS (food balances 2010-), PP (producer prices, annual), RL (land use) and CP (consumer price indices, MONTHLY: food and general CPI and food price inflation by country, each observation carries month and period; example domain "CP", area "100" (India), item "23013" (food CPI), year "2024")), read one country or one commodity at a time (give area, or item without area to compare countries; names are accepted as well as codes; sort: "value_desc" ranks). Each answer says answered_from stored_copy, carries FAO's data date and the FAO attribution, and omits figures FAO flags X (from an external organization). Other domains need _apiKey for FAO's account-gated live API.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "area": "231",
      "item": "15",
      "year": "2022",
      "element": "5510",
      "domain_code": "QCL"
    },
    "name": "faostat_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
areaNoOne or more FAOSTAT area codes, comma-separated, e.g. "231" or "231,68,100". From faostat_dimensions dimension "area".
itemNoOne or more item codes, comma-separated, e.g. "15" (wheat). From faostat_dimensions dimension "item".
sortNoStored copy only: "value_desc" returns the largest values first (e.g. top producers of one item in one year).
yearNoOne or more years, comma-separated, e.g. "2022" or "2018,2019,2020,2021,2022". Omit for every year the domain holds.
limitNoMax observations to return (default 100, max 2000).
monthNoStored copy, monthly domains only (CP): one or more months 1-12, comma-separated, e.g. "3" or "1,2,3". Omit for every month. Ignored by the annual domains.
_apiKeyNoOptional. A FAOSTAT access token, or "email:password" for a FAOSTAT account: sends the call live to FAO's account-gated query API (any domain). Without it the call is answered from the stored copy of QCL, FBS, PP, RL and CP.
elementNoOne or more element codes, comma-separated, e.g. "5510" (production quantity). From faostat_dimensions dimension "element".
domain_codeYesFAOSTAT domain code, e.g. "QCL". From faostat_domains.
include_aggregatesNoStored copy only: with sort "value_desc" and no area, regional and world aggregates (area codes 5000+) are left out unless this is true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / _apiKey / description
      Previous value: -"Optional. A FAOSTAT access token, or \"email:password\" for a FAOSTAT account: sends the call live to FAO's account-gated query API (any domain). Without it the call is answered from the stored copy of QCL, FBS, PP and RL."New value: +"Optional. A FAOSTAT access token, or \"email:password\" for a FAOSTAT account: sends the call live to FAO's account-gated query API (any domain). Without it the call is answered from the stored copy of QCL, FBS, PP, RL and CP."
    • addedInput schema / properties / month
      Added value: +{
      +  "description": "Stored copy, monthly domains only (CP): one or more months 1-12, comma-separated, e.g. \"3\" or \"1,2,3\". Omit for every month. Ignored by the annual domains.",
      +  "type": "string"
      +}
  2. Changed4 schema fields changed
    • changedInput schema / properties / _apiKey / description
      Previous value: -"FAOSTAT access token, or \"email:password\" for a free FAOSTAT account. Required: FAO's query API no longer answers anonymous calls."New value: +"Optional. A FAOSTAT access token, or \"email:password\" for a FAOSTAT account: sends the call live to FAO's account-gated query API (any domain). Without it the call is answered from the stored copy of QCL, FBS, PP and RL."
    • addedInput schema / properties / include_aggregates
      Added value: +{
      +  "description": "Stored copy only: with sort \"value_desc\" and no area, regional and world aggregates (area codes 5000+) are left out unless this is true.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / sort
      Added value: +{
      +  "description": "Stored copy only: \"value_desc\" returns the largest values first (e.g. top producers of one item in one year).",
      +  "enum": [
      +    "value_desc"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "domain_code",
      -  "_apiKey"
      -]New value: +[
      +  "domain_code"
      +]
  3. Changed2 schema fields changed
    • addedInput schema / properties / _apiKey
      Added value: +{
      +  "description": "FAOSTAT access token, or \"email:password\" for a free FAOSTAT account. Required: FAO's query API no longer answers anonymous calls.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "domain_code"
      -]New value: +[
      +  "domain_code",
      +  "_apiKey"
      +]
  4. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, it discloses provenance (answers from a stored copy of FAO bulk files), which domains are covered (QCL, FBS, PP, RL, CP, with CP being monthly with period), that results carry a data date and attribution, that figures flagged X by FAO are omitted, that include_aggregates controls area codes 5000+, and that other domains fall through to an account-gated live API. This is substantive behavioral context annotations cannot convey.

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

Conciseness3/5

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

The core (what it returns, authority, code sourcing) is front-loaded, but the single paragraph is heavily nested with parenthetical asides, including a mismatched parenthesis in the CP section, and phrases like "answers keylessly" that slow parsing. It is informative but could be split into short scoped lines without losing content.

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 10-parameter, no-output-schema tool, the description covers domain coverage, monthly handling, aggregation exclusion, and stored-copy vs live-API behavior, which is most of what an agent needs. It does not describe truncation/pagination semantics when the default limit of 100 applies, a minor remaining gap.

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 goes beyond it by stressing that area/element/item are numeric domain-specific codes rather than names, that names are also accepted, and by explaining the area-vs-item query shape and the ranking behavior of sort: "value_desc". The month parameter's annual-domain behavior is only covered in the schema, so it is not a full 5.

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 opening sentence states a concrete resource and payload: observation-level FAOSTAT figures with units, year and data-quality flag. It explicitly positions itself against siblings by pointing to faostat_dimensions for area/element/item codes and faostat_domains for domain_code, so an agent can tell which tool supplies codes and which supplies numbers.

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?

It names concrete use cases where this tool is authoritative (production quantities, trade flows, fertiliser/pesticide use, emissions, food balance) and states operational constraints: query one country or one commodity at a time, give item without area to compare countries, and other domains require _apiKey for the live API. It stops short of an explicit when-not/alternative routing statement for the covered domains, which keeps it below 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.