faostat_list_dimensions
Lists a FAOSTAT dataset's dimensions, the names used to filter its data, and each dimension's code-list parts to help you select valid filters.
Instructions
List a FAOSTAT dataset's dimensions, the names its data is filtered by, and their parts.
One request to get_dimensions, kept for a day. Each dimension's id is the name to filter the dataset's data by and the dimension_id list_codes takes: QCL's area, element, item and year, PP's month, MDDW's survey, FS's year3 in place of year. Its parts are code lists of their own, which list_codes takes too, each with its coding systems (M49, FAO, ISO2 and ISO3 for QCL's countries). FAOSTAT answers an unknown dataset with HTTP 500 and no body, which raises NotFoundError; the list of domains is then read, and a dataset it lacks is named with the closest. A call sends the structure and, after that answer, the list of domains, each tried up to four times, eight requests at most, a login where the process holds no token, and a login and the request again where FAOSTAT refuses with 401 or 403.
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": {
"domain_code": "<domain_code>"
},
"name": "faostat_list_dimensions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lang | No | Language of the parts' labels: ``"en"`` (the default), ``"fr"`` or ``"es"``. | en |
| offset | No | Rows of the answer already shown, to skip: the note of a cut answer names the next offset. 0, the default, starts at the first row. | |
| domain_code | Yes | The dataset's code, as ``list_domains`` lists it, e.g. ``"QCL"`` (Crops and livestock products), ``"PP"`` (Producer Prices), ``"MDDW"`` (Minimum Dietary Diversity for Women) or ``"FS"`` (Suite of Food Security Indicators). An empty text, ``"."`` or ``".."`` is refused before sending. |