Skip to main content
Glama
berba-q

FAOSTAT MCP Server

by berba-q

faostat_get_data

Fetch FAOSTAT food and agriculture statistics by domain, filtering by area, item, year, and element; resolve filter codes first to query production, trade, and emissions.

Instructions

Fetch domain data. Resolve filter codes with faostat_search_codes first. Element FILTER codes differ from display codes (QCL Production: filter 2510, display 5510). Filter large queries by area/item/year; check datasize when unsure. Prefer response_format="compact" and fields to save tokens; objects and csv are supported. limit=50; 0 returns all rows. Preserve units when selecting fields.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
areaNo
itemNo
langNoen
yearNo
limitNo
fieldsNo
area_csNo
elementNo
item_csNo
year_csNo
show_unitNo
element_csNo
show_codesNo
show_flagsNo
domain_codeYes
null_valuesNo
response_formatNocompact

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.3.0
    • changedInput schema / properties / response_format / default
      Previous value: -"objects"New value: +"compact"
  2. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose real behavioral traits: limit defaults to 50 and limit=0 returns all rows, filter codes differ from display codes, units are preserved, and multiple response formats (compact/objects/csv) are supported. It omits auth/permission needs and pagination beyond limit, but the disclosure is substantial.

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 purpose is front-loaded in the first sentence, and the following clauses are dense with actionable instruction and little waste. Some abbreviations ('QCL Production') and packed directives are slightly cryptic, but the structure is efficient for a 17-parameter tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 explained, and the description supplies solid operational guidance for a complex tool. However, for 17 parameters with zero schema descriptions and no annotations, the many unexplained flags and _cs variants leave it short of complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% across 17 parameters, so the description must compensate, but it only meaningfully covers a handful (element, limit, response_format, fields, area/item/year filtering). The four _cs variants (area_cs, item_cs, year_cs, element_cs), lang, show_unit, show_codes, show_flags, null_values, and domain_code are entirely undocumented. The element filter-code detail is genuinely valuable but does not offset the large uncovered majority.

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?

States a specific verb and resource ('Fetch domain data') and distinguishes itself from siblings by naming faostat_search_codes as the prerequisite and faostat_get_datasize as a scoping helper. The resource 'domain data' is somewhat generic, but the operational framing makes it clear this is the primary data-retrieval tool.

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?

Explicitly routes the agent: resolve filter codes with faostat_search_codes first, check datasize when unsure, and prefer response_format='compact'. It names the alternative tools and the conditions that select them, leaving little to inference.

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