Skip to main content
Glama

dhis2_query

Query a DHIS2 instance via its API for metadata validation, data element lookup, indicator queries, and data quality checks. Returns formatted JSON responses.

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?

With no annotations provided, the description carries the burden. It mentions authentication, automatic URL prefix handling, and return format (JSON as text). However, it does not disclose potential side effects of write operations (POST/PUT), rate limits, or error behavior, which are important for a tool that can modify data.

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 well-structured with a summary line, parameter explanations, and examples. It is front-loaded with the core action. While thorough, it could be slightly more concise (e.g., combining explanation and examples), but 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 has 4 parameters, an output schema (though not shown), and no annotations, the description is comprehensive. It explains all parameters, provides examples, and specifies behavior (authentication, prefix handling, return format). It covers the necessary context for an agent to use the tool correctly.

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?

The description provides full parameter documentation via an Args section, explaining endpoint (relative path), params (dict), method (default GET), and body (serialized for POST/PUT). It also gives multiple examples. This adds significant value beyond the bare input schema, which has 0% description 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 states the tool's purpose: 'Make an authenticated API call to the configured DHIS2 instance.' It specifies use cases like metadata validation and data element lookup, and gives concrete examples. This is a specific verb+resource definition that distinguishes it from sibling tools like dhis2_metadata.

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 explicitly lists when to use the tool ('live metadata validation, data element lookup, indicator queries, and data quality checks'). It provides usage examples and parameter guidance, but does not explicitly state when not to use it or compare with alternatives like dhis2_metadata, which would be ideal.

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_PH'

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