Skip to main content
Glama

faostat-mcp-server

Server Details

UN FAOSTAT global food & agriculture statistics over a local SQLite mirror, via MCP.

Status
Healthy
Last Tested
Transport
Streamable HTTP
URL

Glama MCP Gateway

Connect through Glama MCP Gateway for full control over tool access and complete visibility into every call.

MCP client
Glama
MCP server

Full call logging

Every tool call is logged with complete inputs and outputs, so you can debug issues and audit what your agents are doing.

Tool access control

Enable or disable individual tools per connector, so you decide what your agents can and cannot do.

Managed credentials

Glama handles OAuth flows, token storage, and automatic rotation, so credentials never expire on your clients.

Usage analytics

See which tools your agents call, how often, and when, so you can understand usage patterns and catch anomalies.

100% free. Your data is private.
Tool DescriptionsA

Average 4.5/5 across 6 of 6 tools scored. Lowest: 3.7/5.

Server CoherenceA
Disambiguation5/5

Each tool has a clearly distinct purpose: profile assembling, canvas table listing, SQL querying, domain discovery, observation querying, and code resolution. There is no overlap in functionality.

Naming Consistency5/5

All tools follow a consistent 'faostat_verb_noun' pattern in snake_case, making it easy to predict tool functionality from the name.

Tool Count5/5

Six tools is well-scoped for a data exploration server, covering discovery, query, analysis, and profile generation without being overwhelming or insufficient.

Completeness5/5

The tool surface covers the full lifecycle for FAOSTAT data: domain listing, code resolution, observation querying, commodity profiling, and ad-hoc SQL analysis via canvas tables. No obvious gaps for the read-only domain.

Available Tools

6 tools
faostat_commodity_profilefaostat-mcp-server: commodity profileA
Read-only
Inspect

Assemble a global profile for one commodity in a single call: top-producing countries, the multi-decade production trend, and trade flows (top exporters and importers). Accepts a commodity name, resolves it to item codes, then queries the production (QCL) and trade (TCL) domains and merges the results. Country-level only (aggregates excluded). When a required domain is not indexed locally, returns a partial profile with a notice naming the gap rather than failing. The full merged observation set spills to a DataCanvas table for deeper SQL via faostat_dataframe_query.

ParametersJSON Schema
NameRequiredDescriptionDefault
top_nNoNumber of top producers / exporters / importers to return. Max 50.
year_endNoInclusive end year for the trend (e.g. 2022).
canvas_idNoCanvas ID from a prior call to stage onto. Omit to start a fresh canvas.
item_queryYesCommodity name to profile (e.g. "maize", "wheat", "coffee green").
year_startNoInclusive start year for the trend (e.g. 1990).

Output Schema

ParametersJSON Schema
NameRequiredDescription
noticeNoNames any required domain that was not indexed, or other partial-result context.
spilledYesTrue when the merged observation set was staged on a canvas table.
canvas_idNoCanvas ID holding the merged set — pass to faostat_dataframe_query / _describe.
item_queryYesThe commodity query echoed back.
table_nameNoCanvas table holding the merged production+trade observations (present when spilled).
trend_pointsYesCount of production trend observations staged for the resolved commodity.
top_exportersYesTop exporters by export quantity (empty when trade is not indexed).
top_importersYesTop importers by import quantity (empty when trade is not indexed).
top_producersYesTop producers by production value (countries only).
resolved_itemsYesCommodities the query resolved to (the profile aggregates across all of them).
resolvedItemCodesYesItem codes the commodity query resolved to.
Behavior1/5

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

The description adds valuable context including partial profile behavior and canvas table creation, but it contradicts the readOnlyHint annotation by stating that the tool 'spills to a DataCanvas table', implying a side effect. According to evaluation rules, a score of 1 is given when description contradicts annotations.

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

Conciseness5/5

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

The description is concise (5 sentences), front-loaded with the main output, and structured logically without fluff. Every sentence adds value.

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?

Given the tool's complexity (5 parameters, composite behavior) and the existence of an output schema, the description is complete. It explains the overall behavior, partial results, country-level scope, and the canvas table spill for further analysis.

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 100%, so all parameters are already documented. The tool description provides overall process context but does not add specific meaning to individual parameters beyond what the schema offers. Baseline score of 3 is appropriate.

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 assembles a global profile for one commodity, listing top producers, production trend, and trade flows. It explains the process of resolving commodity name to codes and querying production and trade domains, distinguishing it from sibling tools like faostat_query_observations which are lower-level.

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 implies use for quick profile assembly and mentions the alternative faostat_dataframe_query for deeper SQL analysis. However, it lacks explicit when-to-use or when-not-to-use comparisons with all siblings, such as when raw data or specific domains are needed.

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

faostat_dataframe_describefaostat-mcp-server: dataframe describeA
Read-onlyIdempotent
Inspect

List the canvas tables (faostat_xxxxxxxx) staged by faostat_query_observations and faostat_commodity_profile, each with its source tool, the query parameters that produced it, creation/expiry timestamps, row count, and column schema. Call this before faostat_dataframe_query to discover the exact table and column names to reference in SQL.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameNoOptional table name (faostat_xxxxxxxx) to describe a single staged table. Omit to list all.
canvas_idNoOptional canvas ID from a prior faostat_query_observations / faostat_commodity_profile call. Omit to list the tables staged in this session (the common case).

Output Schema

ParametersJSON Schema
NameRequiredDescription
tablesYesActive staged tables for this session, newest first. Empty when none are staged.
Behavior5/5

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

Annotations already declare readOnlyHint and idempotentHint. Description adds behavioral context on what metadata is returned (e.g., source tool, parameters, timestamps, row count, column schema), complementing annotations.

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

Conciseness5/5

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

Single, well-structured sentence that front-loads the action ('List the canvas tables...') and follows with usage guidance. No unnecessary words.

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?

Tool is simple with full schema coverage and output schema present. Description covers what the tool lists, source tools, and provides usage context. No gaps for an agent to discover table and column names.

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 coverage is 100% with descriptions for both parameters. Description does not add significant new meaning beyond what schema already provides, but gives slight contextual value by linking parameters to workflow.

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?

Clearly states the tool lists canvas tables with details like source tool, query parameters, timestamps, row count, and column schema. Distinguishes from siblings like faostat_dataframe_query which queries tables.

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 instructs to call this before faostat_dataframe_query to discover table and column names for SQL. Also mentions it lists tables from faostat_query_observations and faostat_commodity_profile.

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

faostat_dataframe_queryfaostat-mcp-server: dataframe queryA
Read-onlyIdempotent
Inspect

Run a single-statement SELECT against the canvas tables staged by faostat_query_observations and faostat_commodity_profile (table names look like faostat_xxxxxxxx). Use this for cross-country and cross-item aggregation, GROUP BY rankings, joins, and time-series analysis over the full result set the inline preview only sampled. Standard DuckDB SQL — joins, aggregates, window functions, CTEs all work. Read-only: writes, DDL, DROP, COPY, PRAGMA, ATTACH, and external-file table functions are rejected; system catalogs (information_schema, sqlite_master, duckdb_*) are denied — list staged tables via faostat_dataframe_describe. Every row carries its data-quality flag (A=Official, E=Estimated, I=Imputed, …) — keep it in projections and honor it in interpretation.

ParametersJSON Schema
NameRequiredDescriptionDefault
sqlYesSingle-statement read-only SELECT against staged faostat_<id> tables. Columns: area_code, area, item_code, item, element_code, element, year, unit, value, flag. CAST(value AS DOUBLE) for arithmetic.
canvas_idNoOptional canvas ID from a prior faostat_query_observations / faostat_commodity_profile call. Omit to query the tables staged in this session (the common case).
row_limitNoHard cap on rows in the response. Default 1000, max 10000.

Output Schema

ParametersJSON Schema
NameRequiredDescription
rowsYesMaterialized result rows, bounded by row_limit.
noticeNoGuidance when the query returned no rows or when results were capped.
columnsYesColumn names in projection order.
row_countYesTotal rows the query produced (may exceed rows.length when capped).
Behavior5/5

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

Description explicitly states read-only nature, rejects certain statements, and explains the data-quality flag, adding context beyond the readOnlyHint and idempotentHint annotations.

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

Conciseness5/5

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

Description is concise (about 5 sentences), front-loaded with purpose, and contains no redundant information.

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?

Given 3 parameters, output schema, and annotations, the description covers all necessary details including behavior, constraints, and data-quality interpretation.

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

Parameters5/5

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

Schema coverage is 100%; description enhances each parameter with column details, usage guidance, and limits (e.g., default row_limit 1000, max 10000).

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 it runs single-statement SELECT queries against staged tables for cross-country aggregation, joins, and time-series analysis, distinguishing it from siblings that stage data or provide previews.

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 explains when to use (cross-country analysis, full result sets) and what is rejected (writes, DDL, etc.). It mentions faostat_dataframe_describe for listing tables, but does not explicitly contrast with every sibling.

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

faostat_list_domainsfaostat-mcp-server: list domainsA
Read-onlyIdempotent
Inspect

Discover FAOSTAT statistical domains (production, trade, food balances, food security, land use, agri-emissions, prices, value) with their codes, descriptions, last-update date, upstream row count, and local index status. Every query keys on a domain code from here. The indexed flag tells you which domains are queryable right now; un-indexed domains exist in the catalog but must be added to FAOSTAT_DOMAINS and re-synced before faostat_query_observations can read them.

ParametersJSON Schema
NameRequiredDescriptionDefault
topicNoCase-insensitive substring filter over domain code, name, and topic (e.g. "trade", "emissions", "QCL"). Omit to list the full catalog.
indexed_onlyNoWhen true, return only domains indexed in the local mirror (queryable now).

Output Schema

ParametersJSON Schema
NameRequiredDescription
noticeNoGuidance when a topic filter matched nothing or no domains are indexed yet.
domainsYesMatching domains, sorted by code.
totalCountYesTotal domains in the FAOSTAT catalog.
indexedCountYesDomains currently indexed in the local mirror.
Behavior4/5

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

Annotations indicate a read-only, idempotent operation. The description adds valuable behavioral context by explaining that un-indexed domains exist in the catalog but must be synced before they can be queried, and by listing the returned attributes. No contradictions.

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 three sentences, each adding distinct value: purpose, usage context, and flag explanation. It is front-loaded with the main action and efficiently provides necessary detail without fluff.

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?

Given the tool's simplicity (2 optional params, no required), the description thoroughly covers retrieval of domain details, the significance of the `indexed` flag, and the dependency on query tools. It fully complements the output schema.

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 descriptions cover both parameters fully. The description adds semantic value by explaining the `topic` filter's case-insensitive substring behavior and the purpose of `indexed_only`, exceeding the baseline 3 for high coverage.

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 identifies the tool's purpose: to discover FAOSTAT statistical domains with detailed attributes. It lists example domains and emphasizes that domain codes are keys for other queries, distinguishing this tool from the sibling query tools.

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 explains that this tool should be used to obtain domain codes for subsequent queries, and clarifies the meaning of the `indexed` flag, indicating which domains are queryable. It implicitly advises using this before `faostat_query_observations`, but does not explicitly state when not to use it.

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

faostat_query_observationsfaostat-mcp-server: query observationsA
Read-only
Inspect

Query a FAOSTAT domain's data cube by area(s), item(s), element(s), and year range, returning observations (area, item, element, year, value, unit, and the data-quality flag). Resolve codes first with faostat_resolve_codes — the cube is unqueryable without them. Aggregate regions (World, continents, economic groupings) are EXCLUDED by default so a naive SUM does not double-count a region with its member countries; set include_aggregates=true to get the regional roll-ups, or pass explicit area_codes to query exactly what you name. Small result sets return inline; large ones spill to a DataCanvas table (returned canvas_id + table_name) for GROUP BY / ranking / time-series analysis via faostat_dataframe_query. Every row carries its flag (A=Official, E=Estimated, I=Imputed, B=break, X=external) — honor it; never treat estimated/imputed values as official.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMax observations returned inline when the result does not spill. Max 1000.
domainYesFAOSTAT domain code (e.g. "QCL"). Must be indexed locally.
year_endNoInclusive end year (e.g. 2022).
canvas_idNoCanvas ID from a prior call to stage onto. Omit to start a fresh canvas (a new id is returned).
area_codesNoArea codes from faostat_resolve_codes. When set, aggregates are NOT auto-excluded — the codes are honored verbatim.
item_codesNoItem codes from faostat_resolve_codes.
year_startNoInclusive start year (e.g. 2000).
element_codesNoElement codes from faostat_resolve_codes (e.g. 5510 Production).
include_aggregatesNoWhen false (default), exclude aggregate-region rows (codes ≥ 5000) so sums are not double-counted. Set true for World/continent/grouping roll-ups. Ignored when explicit area_codes are passed.

Output Schema

ParametersJSON Schema
NameRequiredDescription
domainYesThe domain code echoed back.
noticeNoGuidance on empty results, aggregate exclusion, or how to reach the spilled set.
spilledYesTrue when the full result was staged on a DataCanvas table.
canvas_idNoCanvas ID holding the staged result — pass to faostat_dataframe_query / _describe.
table_nameNoCanvas table name holding the full result set (present when spilled).
totalCountYesTotal observations matched before any inline cap.
observationsYesInline observations (preview when the full set spilled to a canvas table).
Behavior5/5

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

Discloses aggregate exclusion by default, spill mechanism for large results, data-quality flags and how to treat them. No contradiction with annotations; adds context beyond readOnlyHint and idempotentHint.

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?

Single paragraph, well-structured and packs essential information. Each sentence adds value. Slightly long but still concise; could break into multiple paragraphs for readability.

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?

Comprehensive for a complex tool with 9 parameters and output schema. Covers main behavior, aggregate handling, spill mechanism, data quality advising. No gaps given the context.

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%, baseline 3. Description adds value by explaining the interaction between include_aggregates and area_codes, and the default behavior. Could add a bit more on limit spill threshold, but still strong.

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 it queries a FAOSTAT domain's data cube by area(s), item(s), element(s), and year range, returning observations with details. It distinguishes from siblings like faostat_resolve_codes and faostat_dataframe_query by explaining the workflow.

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 specifies to resolve codes first with faostat_resolve_codes, explains when to use include_aggregates (default false to avoid double-counting), and when to use explicit area_codes. Also describes what to do with inline vs. spill results.

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

faostat_resolve_codesfaostat-mcp-server: resolve codesA
Read-onlyIdempotent
Inspect

Resolve human terms to the opaque integer codes faostat_query_observations needs, within a dimension: areas (countries/regions), items (commodities), or elements (metrics like production, yield, import quantity). Pass query for fuzzy full-text matching ("maize" → item 56), name_contains for a substring filter, or code for an exact-code lookup; omit all three to list the whole dimension. Every area match is flagged country or aggregate — aggregates (World, continents, economic groupings; codes ≥ 5000) double-count if summed with their member countries, so resolve before querying and exclude aggregates unless you want the regional roll-up.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeNoExact code lookup. Takes precedence over `query`/`name_contains` when provided.
limitNoMaximum matches to return (max 200).
queryNoFull-text search term, FTS5-matched against the dimension labels with prefix matching (e.g. "wheat", "import quantity"). Relevance-ranked.
domainYesFAOSTAT domain code to verify the index is ready (e.g. "QCL"). Dimension code lists (areas, items, elements) are shared across all indexed domains.
dimensionYesWhich dimension to resolve: "area" (countries/regions), "item" (commodities), or "element" (metrics).
name_containsNoCase-insensitive substring filter over the label. Used only when `query` is omitted.

Output Schema

ParametersJSON Schema
NameRequiredDescription
domainYesThe domain code echoed back.
noticeNoGuidance when nothing matched or the dimension is not yet indexed.
matchesYesMatching codes, relevance-ranked for query mode, else by code.
dimensionYesThe dimension resolved.
truncatedYesTrue when matches were capped at the limit.
totalMatchesYesTotal matches before the result cap.
Behavior5/5

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

Annotations declare readOnlyHint and idempotentHint, but the description adds crucial context: every area match is flagged as country or aggregate, and aggregates double-count if summed with member countries. This transcends mere annotation repetition.

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?

Description is several sentences but each earns its place, front-loaded with purpose. Could be slightly more concise by merging warnings, but overall efficient.

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?

For a tool with 6 parameters, 2 required, and an output schema (not shown), the description covers all main aspects: selection criteria, aggregation warnings, and output flags. Complete and sufficient for agent decision-making.

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%, but description enriches understanding with usage details like precedence (code takes precedence), FTS5 prefix matching for query, and default limit of 50. Slightly redundant with schema but adds valuable context.

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 resolves human terms to opaque integer codes for dimensions (areas, items, elements) needed by faostat_query_observations. It distinguishes its purpose from sibling tools by mentioning the specific use case.

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?

Provides explicit guidance on when to use each parameter (query, name_contains, code) and when to omit them to list the entire dimension. Warns about aggregates double-counting and advises excluding them unless needed.

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

Discussions

No comments yet. Be the first to start the discussion!

Try in Browser

Your Connectors

Sign in to create a connector for this server.

Resources