get_analytics
Retrieve aggregate analytics data from DHIS2 and display results in a readable table. Specify data elements, indicators, organization units, and time periods.
Instructions
Run an aggregate analytics query and return a readable table.
Args: data_dimension: one or more data element / indicator UIDs joined by ';' (semicolon). Find UIDs with search_metadata. org_units: org unit UIDs joined by ';', or a keyword such as USER_ORGUNIT, or a level like LEVEL-2. periods: period values joined by ';'. Accepts fixed periods (202401, 2024Q1, 2024) or relative keywords like LAST_12_MONTHS, THIS_YEAR, LAST_4_QUARTERS, LAST_5_YEARS. output_scheme: NAME (default) for readable labels, or UID.
Example: data_dimension="fbfJHSPpUQD;cYeuwXTCPkU", org_units="ImspTQPwCqd", periods="LAST_12_MONTHS"
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": {
"data_dimension": "<data_dimension>",
"org_units": "<org_units>",
"periods": "<periods>"
},
"name": "get_analytics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| periods | Yes | ||
| org_units | Yes | ||
| output_scheme | No | NAME | |
| data_dimension | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |