Skip to main content
Glama

dhis2_query

Query a DHIS2 instance via authenticated API calls to retrieve metadata, validate data elements, check indicators, and perform data quality checks.

Instructions

Make an authenticated API call to the configured DHIS2 instance.

Returns the JSON response as formatted text. Use for live metadata
validation, data element lookup, indicator queries, and data quality checks.

Args:
    endpoint: API path relative to /api/, e.g. "dataElements" or "organisationUnits.json".
              If it does not start with "/api/", that prefix is added automatically.
    params:   Query parameters as a dict, e.g. {"fields": "id,name", "paging": "false"}.
    method:   HTTP method — "GET" (default), "POST", or "PUT".
    body:     Request body for POST/PUT (serialised to JSON).

Examples:
    dhis2_query("dataElements", {"fields": "id,name,valueType", "paging": "false"})
    dhis2_query("system/info")
    dhis2_query("organisationUnits", {"filter": "level:eq:2", "fields": "id,name,level"})

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endpointYes
paramsNo
methodNoGET
bodyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It mentions authentication, return format, and HTTP methods, but does not discuss side effects or safety implications of POST/PUT methods. Some behavioral traits are disclosed, but not comprehensively.

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 and well-structured: purpose, return value, use cases, parameter explanations in Args format, and examples. Every sentence adds value, and the most critical information is front-loaded.

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?

Given the presence of an output schema, the description adequately covers input parameters and provides examples. It could mention potential errors or authentication details, but it is fairly complete for a generic API call tool.

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 description coverage is 0%, so the description fully compensates. It explains each parameter with details, automatic URL prefixing, and includes multiple examples. This adds significant meaning beyond the schema.

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 makes authenticated API calls to DHIS2, listing specific use cases (metadata validation, data element lookup, etc.). It distinguishes itself from siblings like dhis2_metadata through its generic API call nature.

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 provides examples and explains the return format, but does not explicitly state when to use this tool over siblings like dhis2_metadata. Usage guidance is clear but lacks direct differentiation.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SVerITG/Metis'

If you have feedback or need assistance with the MCP directory API, please join our Discord server