Skip to main content
Glama
ahasan722

DHIS2 MCP Server

by ahasan722

DHIS2 MCP Server

License: MIT Python 3.10+ MCP

Connect any DHIS2 instance to Claude and other AI assistants through the Model Context Protocol. Point it at a URL, give it credentials, and your AI client can explore the org unit hierarchy, search metadata, and pull analytics in plain language. No custom integration per instance.

DHIS2 is the world's largest health information management system, used as the national HMIS in more than 80 countries. This server turns it into a tool your AI assistant can actually query.


What it does

Ask your assistant questions like:

"Connect to our DHIS2 and show the ANC 1st visit coverage trend for Dhaka division over the last 12 months."

and it will resolve the indicator and org unit names to UIDs, run the analytics query, and explain the result. No UIDs, no API syntax, no manual exports.

Related MCP server: MCP-Slicer

Features

Capability

Tools

Connection

dhis2_ping, dhis2_whoami, dhis2_api_overview

Metadata search

search_metadata, list_org_units, org_unit_children, list_data_sets, list_programs

Aggregate data

get_analytics, get_analytics_raw, get_data_value_set

Tracker / events

get_events, get_enrollments

Resources

live system/info, relative-period reference

Prompts

explore_instance, indicator_trend

  • Works with any instance via environment variables

  • Supports personal access tokens or basic auth

  • Resolves names to UIDs automatically, so users never touch identifiers

  • Name-resolved, tabular analytics output ready for analysis

  • Self-signed cert and API-version overrides for national deployments

Quick start

1. Install

git clone https://github.com/ahasan722/dhis2-mcp-server.git
cd dhis2-mcp-server

# with uv (recommended)
uv venv && source .venv/bin/activate
uv pip install -e .

# or with pip
python -m venv .venv && source .venv/bin/activate
pip install -e .

2. Configure

cp .env.example .env
# edit .env with your instance URL and credentials

Try it against the public DHIS2 demo first (no setup needed):

DHIS2_BASE_URL=https://play.im.dhis2.org/stable-2-41-3
DHIS2_USERNAME=admin
DHIS2_PASSWORD=district

3. Test with MCP Inspector

mcp dev src/dhis2_mcp/server.py

Open the Inspector, list the tools, and run dhis2_ping. You should see the instance version come back.

4. Connect to Claude Desktop

Add to your claude_desktop_config.json (%APPDATA%\Claude\ on Windows, ~/Library/Application Support/Claude/ on macOS):

{
  "mcpServers": {
    "dhis2": {
      "command": "dhis2-mcp",
      "env": {
        "DHIS2_BASE_URL": "https://play.im.dhis2.org/stable-2-41-3",
        "DHIS2_USERNAME": "admin",
        "DHIS2_PASSWORD": "district"
      }
    }
  }
}

Restart Claude Desktop. The DHIS2 tools appear in the tools menu.

Configuration reference

Variable

Required

Description

DHIS2_BASE_URL

yes

Instance URL, with or without /api

DHIS2_PAT

one of

Personal access token (d2pat_...)

DHIS2_USERNAME / DHIS2_PASSWORD

one of

Basic-auth credentials

DHIS2_API_VERSION

no

Pin an API version, e.g. 40

DHIS2_VERIFY_SSL

no

false for self-signed certs

DHIS2_TIMEOUT

no

Request timeout in seconds (default 60)

A personal access token is safer than a password and is recommended for shared or hosted deployments.

Example session

You:  Is the connection working?
AI:   [dhis2_ping] Connected to DHIS2 version 2.41.3.

You:  What's the trend of BCG doses given in Bo district last 12 months?
AI:   [search_metadata] found indicator "BCG doses given"
      [list_org_units]  found org unit "Bo"
      [get_analytics]   periods=LAST_12_MONTHS
      Here is the monthly trend ... (table + summary)

Architecture

src/dhis2_mcp/
├── config.py        # env-driven settings, URL normalisation
├── client.py        # httpx wrapper: auth, paging, error handling
├── server.py        # FastMCP instance, resources, prompts
└── tools/
    ├── system.py    # connection + instance info
    ├── metadata.py  # name → UID discovery
    ├── analytics.py # aggregate queries + raw data values
    └── tracker.py   # events + enrollments

The model never needs a UID: every data tool is paired with a metadata search tool, and the server instructions tell the assistant to resolve names first.

Security notes

  • Credentials are read from the environment, never hard-coded or sent to the model.

  • Prefer a personal access token scoped to read-only authorities.

  • .env is git-ignored. Do not commit credentials.

  • This server only reads; it defines no write/delete tools by default.

Development

pip install -e ".[dev]"
pytest          # config + import tests (no live instance needed)
ruff check .

Roadmap

  • Write tools (data value import) behind an explicit opt-in flag

  • Streamable HTTP transport for shared hosting

  • Caching layer for metadata lookups

  • Org unit GeoJSON export for mapping

Contributing

Issues and pull requests are welcome. Please open an issue describing the DHIS2 version and use case before large changes.

License

MIT. See LICENSE.

Acknowledgements

Built for the public health data community. DHIS2 is developed by the HISP Centre, University of Oslo. MCP is an open standard from Anthropic.

Available Tools

13 tools
dhis2_api_overviewA

List the main resource collections the instance exposes (data elements, indicators, programs, etc.) so you know what is queryable.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations, the description should disclose traits like read-only nature or side effects. It only states what the tool does but not any behavioral aspects such as being non-destructive or requiring authentication.

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 a single, concise sentence that immediately conveys the tool's purpose without unnecessary detail. Every word earns its place.

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 no parameters and no annotations, the description adequately covers the tool's purpose for a discovery tool. It is complete enough for an agent to understand its utility, though it could mention the output format (e.g., list of resource names) but output schema likely covers that.

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?

No parameters exist, so baseline is 4. The description adds no parameter information, which is appropriate given the absence of parameters.

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 action (list) and the resource (main resource collections) with the goal of informing what is queryable. It effectively differentiates from sibling tools that are specific to individual resources.

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 using this tool first to discover available resources before using more specific tools, providing clear context. However, it lacks explicit when-not-to-use or alternative guidance.

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

dhis2_pingA

Test the connection to the configured DHIS2 instance.

Returns the instance version, revision and server date, or a clear error if the instance is unreachable or credentials are wrong. Call this first when troubleshooting.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.7/5.0
Behavior5/5

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

Fully describes what happens: returns version info or clear error on unreachable/bad credentials. No annotations provided, so description carries full burden and meets it completely.

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?

Two sentences, front-loaded with purpose, every sentence adds value. No wasted 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?

For a zero-parameter tool with output schema, description covers return value and error handling completely. No gaps.

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?

No parameters in input schema, so baseline 4 applies. Description does not need to add parameter meaning.

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 it tests connection to the DHIS2 instance and returns version, revision, server date, or error. Distinguishes from sibling tools by being a connectivity test rather than data retrieval.

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?

Explicitly advises to call this first when troubleshooting, providing clear usage context. While no explicit when-not-to-use, the simplicity of a ping tool makes that unnecessary.

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

dhis2_whoamiA

Return the authenticated user: name, username, roles and the organisation units they are assigned to. Useful for confirming which data the account can see.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior4/5

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

No annotations are provided, so the description carries the transparency burden. It discloses that the tool returns user info and implies a read-only operation. While it does not explicitly state 'no side effects', the behavior is obvious and non-contradictory.

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?

Two sentences, front-loaded with the action and result. No wasted words. The description is efficient and easy to parse.

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 zero parameters and an existing output schema, the description fully covers what the tool does and when to use it. No additional context is needed for this simple tool.

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?

The input schema is empty (100% coverage), so baseline is 3. The description adds value by enumerating the returned fields (name, username, roles, org units), which helps the agent understand what the tool provides beyond the empty 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 it returns the authenticated user's identity (name, username, roles, org units) and provides a specific use case. This distinguishes it from siblings like dhis2_ping or get_analytics.

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 gives a clear usage context ('confirming which data the account can see') but does not explicitly state when not to use or compare to alternatives. However, given the tool's specificity, this is sufficient.

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

get_analyticsA

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"

ParametersJSON Schema
NameRequiredDescriptionDefault
periodsYes
org_unitsYes
output_schemeNoNAME
data_dimensionYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior3/5

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

The description implies read-only behavior (query returning a table) but does not explicitly state it's non-destructive or safe. With no annotations, this is a gap.

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?

Well-structured with Args section and example, but the example is somewhat verbose. Overall concise and easy to read.

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 output schema exists (not shown), return values don't need explanation. Parameters are well-documented. However, limitations like pagination or result size are not mentioned.

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 0%, but the description thoroughly explains each parameter including formats, defaults, and acceptable values (e.g., periods accept fixed and relative keywords). 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 runs an aggregate analytics query and returns a readable table, distinguishing it from sibling 'get_analytics_raw' which likely provides raw data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions using search_metadata to find UIDs and provides an example, but does not explicitly state when to use this tool vs alternatives like get_analytics_raw or 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.

get_analytics_rawA

Advanced analytics call with full control over dimensions.

Pass raw dimension strings exactly as the DHIS2 analytics API expects, e.g. ["dx:UID;UID", "pe:LAST_12_MONTHS", "ou:UID"]. Use filters for dimensions you want fixed but not shown as columns. Prefer get_analytics for the common case.

ParametersJSON Schema
NameRequiredDescriptionDefault
filtersNo
dimensionsYes
output_schemeNoNAME

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
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 implies a pass-through to the DHIS2 analytics API but does not explicitly state read-only behavior, rate limits, or side effects. The description adds some context but lacks full behavioral disclosure.

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 concise and front-loaded with purpose. Each sentence adds value, including an example. It could be slightly more compact, but it remains efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Although an output schema exists (so return values need not be explained), the description does not cover the 'output_scheme' parameter, potential error conditions, or format validation for dimension strings. This leaves some gaps for a tool intended for advanced, raw usage.

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 description coverage is 0%, but the description adds significant meaning for 'dimensions' (with an example of raw strings) and 'filters' (explaining their purpose). However, 'output_scheme' is left unexplained. Overall, it compensates well for the lack of schema descriptions.

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 'Advanced analytics call with full control over dimensions', distinguishing it from the sibling tool get_analytics by explicitly stating 'Prefer get_analytics for the common case'. The verb 'analytics call' and resource 'dimensions' are specific.

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?

The description provides explicit guidance: 'Pass raw dimension strings exactly as the DHIS2 analytics API expects' with an example, explains the use of filters, and advises when to use the alternative tool ('Prefer get_analytics for the common case').

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

get_data_value_setA

Fetch raw (non-aggregated) data values straight from data entry, for one dataset, period and org unit. Use when you need the exact captured values rather than analytics output.

Args: data_set: dataset UID. period: a single period, e.g. 202401 or 2024Q1. org_unit: org unit UID.

ParametersJSON Schema
NameRequiredDescriptionDefault
periodYes
data_setYes
org_unitYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.4/5.0
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 states the tool fetches raw data but does not disclose any side effects, authentication needs, rate limits, or data volume considerations. The description adds basic behavioral context but lacks depth.

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 very concise with no unnecessary words. It fronts the purpose in the first sentence, then lists arguments with clear descriptions. Every sentence adds value.

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 three required string parameters and existence of an output schema, the description covers the tool's purpose, usage context, and parameter details adequately. It lacks information on error conditions or permissions, but for a straightforward fetch tool, this is sufficient.

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 0%, but the description adds meaningful parameter explanations: 'data_set: dataset UID.', 'period: a single period, e.g. 202401 or 2024Q1.', 'org_unit: org unit UID.' This provides format examples and clarifies the purpose beyond the schema's titles, though it could include sources for UIDs.

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 fetches raw non-aggregated data values from data entry for one dataset, period, and org unit. It explicitly contrasts with analytics tools, differentiating from siblings like get_analytics and get_analytics_raw.

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?

The description explicitly says 'Use when you need the exact captured values rather than analytics output', providing clear context and contrasting with alternatives. It also lists the three required parameters.

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

get_enrollmentsB

Query enrollments (tracked entities entering a program).

Args: program: program UID. org_unit: org unit UID. limit: max enrollments.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
programYes
org_unitYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description must disclose all behavioral traits. It provides minimal context (e.g., 'tracked entities entering a program') but omits details like pagination behavior, authentication needs, or return format.

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 extremely concise with no unnecessary words. The key information is front-loaded in a single sentence followed by a clear parameter list.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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, return values need not be detailed. However, the description lacks differentiation from sibling tools and does not explain the relationship between enrollments and other entities. It adequately covers the basic inputs but is still minimal.

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 0%, so the description must explain parameters. It adds meaning by describing each parameter (e.g., 'program UID', 'org unit UID', 'max enrollments'), but does not mention the default value for limit or clarify UID format beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool queries enrollments, defined as 'tracked entities entering a program', using specific verb and resource. However, it does not distinguish from sibling tools like get_events or get_analytics.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives, such as get_events for events or get_analytics for aggregated data. The description only explains what the tool does, not the context of use.

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

get_eventsA

Query event data for a program via the tracker API.

Args: program: program UID (find it with list_programs). org_unit: org unit UID to scope the query. limit: max events to return. occurred_after: optional ISO date (YYYY-MM-DD) lower bound. occurred_before: optional ISO date (YYYY-MM-DD) upper bound.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
programYes
org_unitYes
occurred_afterNo
occurred_beforeNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are provided, so the description must cover behavioral traits. It describes the query operation and parameter meaning, but does not disclose whether it is read-only, any side effects, auth requirements, or rate limits. This leaves moderate transparency.

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 structured with a clear docstring listing parameters. It is fairly concise for the detail provided, though the list format could be slightly more compact. Overall, it is easy to scan and well-organized.

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 tool's complexity (5 params, 2 required), the output schema exists (so return values are covered), and sibling tools are listed, the description is complete. It covers the main usage and parameter details, though it omits behavioral context like idempotency or pagination.

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 must add meaning. It does so thoroughly, explaining each parameter: program UID (with hint to find it), org_unit UID, limit with default, and optional date bounds with ISO format. This greatly enhances understanding beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's verb ('Query') and resource ('event data for a program'), and specifies it uses the tracker API. It distinguishes from sibling tools like get_analytics ('analytics') and get_enrollments ('enrollments'), but does not explicitly contrast with all siblings, so score 4.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides some guidance by mentioning that the program UID can be found with list_programs and that org_unit scopes the query. However, it lacks explicit when-to-use or when-not-to-use statements and does not reference alternative tools like get_enrollments for events vs. enrollments.

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

list_data_setsB

List datasets (data entry forms) with their period type and the data elements they contain. Use this to discover what aggregate data the instance collects.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
queryNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are provided, so the description is the sole source for behavioral traits. It fails to disclose whether the tool is read-only, idempotent, or any rate limits or authentication requirements. The word 'List' implies read-only but is not explicit.

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 two concise sentences. The first sentence states the action and output, and the second provides a use case. No redundant or irrelevant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and an output schema (assumed to cover return values), the description is somewhat complete but lacks details on parameter usage and behavioral guarantees. It covers the basic purpose but not the nuances of filtering or pagination.

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

Parameters1/5

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

The input schema has 2 parameters with 0% description coverage. The description does not explain what the 'limit' and 'query' parameters do or how to use them, leaving the agent without crucial context for proper invocation.

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 that the tool lists datasets (data entry forms) and specifies the information returned (period type and data elements). It also provides a usage hint to discover aggregate data, distinguishing it from sibling tools like list_org_units or list_programs.

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 says 'Use this to discover what aggregate data the instance collects,' which gives a clear context for when to use it. However, it does not mention when not to use it or compare with alternatives like search_metadata.

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

list_org_unitsB

List or search organisation units.

Args: query: optional name filter (case-insensitive substring). level: optional hierarchy level (1=national, higher=more local). limit: max rows.

ParametersJSON Schema
NameRequiredDescriptionDefault
levelNo
limitNo
queryNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.4/5.0
Behavior2/5

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

No annotations provided, so description carries full burden. Discloses only parameter semantics (query, level, limit) but not behavioral traits like read-only nature, idempotency, rate limits, or auth requirements. With no annotations, more transparency needed.

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?

Extremely concise: two sentences plus bullet-like parameter descriptions. Every sentence adds value. Front-loaded with purpose. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Has output schema, so return values are covered. However, description omits context like default behavior (lists all org units if no query/level), pagination beyond limit, or scoping. Adequate but not complete.

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%, yet the description adds meaning beyond the schema: query is 'case-insensitive substring,' level is 'hierarchy level (1=national, higher=more local),' limit is 'max rows.' This fully compensates for the missing schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states 'List or search organisation units.' Verb+resource is specific. Distinguishes from siblings like org_unit_children (lists children) and search_metadata (searches all metadata). However, the 'or search' phrasing could be more precise.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool vs alternatives like org_unit_children for hierarchical queries or search_metadata for broader searches. Agent must infer context from name and siblings.

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

list_programsA

List tracker and event programs with their stages. Use this before querying tracker/event data.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
queryNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description must carry the full burden. It indicates a read-only list operation (implied by 'List'), but does not disclose any behavioral traits such as auth requirements, rate limits, or cost implications. The description is adequate but minimal.

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 two short sentences, each adding value. It is front-loaded with the core functionality and includes actionable guidance, with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool is a simple list operation with an output schema, the description adequately states the purpose. However, it omits details about pagination, filtering, or the structure of the output beyond 'with their stages'. This makes it barely adequate for a tool with no parameter descriptions.

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

Parameters1/5

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

The input schema has two parameters (limit, query) with no descriptions (0% coverage). The tool description does not explain what these parameters do or how to use them, leaving the agent to guess. This is a critical gap.

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 lists tracker and event programs with their stages, differentiating it from sibling tools like list_data_sets or search_metadata. The verb 'List' and resource 'programs' are specific and unambiguous.

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 advises using this tool before querying tracker/event data, providing clear context. However, it does not explicitly state when not to use it or name alternatives, so it falls short of a perfect score.

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

org_unit_childrenA

Return the direct children of an organisation unit, for walking the hierarchy down from a district to facilities.

Args: org_unit_id: the parent org unit UID.

ParametersJSON Schema
NameRequiredDescriptionDefault
org_unit_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior2/5

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

No annotations are provided, and the description does not disclose behavioral traits such as read-only nature, authentication requirements, or rate limits. For a tool with no annotations, this is a significant gap.

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 very concise: one sentence defines purpose, and one line documents the parameter. No wasted 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?

Given the tool's simplicity (single parameter, output schema exists), the description adequately covers purpose and parameter usage.

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?

With 0% schema coverage, the description compensates by clearly explaining the parameter 'org_unit_id' as the parent org unit UID, adding meaning beyond the schema's title.

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 returns direct children of an org unit, with a specific use case of walking hierarchy down from district to facilities. It distinguishes from siblings like list_org_units by focusing on direct children.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a usage scenario (walking hierarchy) but does not explicitly mention when not to use or compare with alternatives like search_metadata.

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

search_metadataA

Search any metadata collection by name and return matching UIDs.

Args: query: text to match on the object name (case-insensitive). object_type: one of dataElement, indicator, dataSet, program, organisationUnit, categoryOptionCombo, optionSet. limit: max rows to return.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
object_typeNodataElement

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior3/5

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

With no annotations, the description covers core behavior like case-insensitive name matching and UID return, but lacks details on pagination, error handling, or empty results. It is adequate but not fully transparent.

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, using a clear Args format with no extraneous text. Every sentence adds value.

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 and the tool's straightforward search nature, the description is largely complete. It could mention that results are only UIDs and that limit applies.

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 0%, but the description fully explains each parameter: query (text), object_type (enumerated list), limit (max rows). This adds essential 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 searches metadata collections by name and returns UIDs, with concrete verb and resource. It distinguishes from sibling tools that list entire collections or fetch specific entities.

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 the tool is for searching metadata by name across multiple object types, but does not explicitly state when to avoid it or provide alternatives. The sibling list offers context for differentiation.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 13 tool updatesv0.1.0
    • First observeddhis2_api_overview
    • First observeddhis2_ping
    • First observeddhis2_whoami
    • First observedget_analytics
    • First observedget_analytics_raw
    • First observedget_data_value_set
    • First observedget_enrollments
    • First observedget_events
    • First observedlist_data_sets
    • First observedlist_org_units
    • First observedlist_programs
    • First observedorg_unit_children
    • First observedsearch_metadata

TDQS

A3.9/5.0

Scored across 13 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: analytics, raw analytics, data values, enrollments, events, metadata search, listings, and system info. No overlap.

Naming Consistency4/5

Most tools follow a verb_noun pattern (e.g., get_analytics, list_programs), though three tools use a dhis2_ prefix (dhis2_api_overview, dhis2_ping, dhis2_whoami). This minor inconsistency is acceptable.

Tool Count5/5

13 tools is well-scoped for a DHIS2 data reading server, covering metadata, analytics, tracker, and system information without being overwhelming.

Completeness4/5

Covers core read operations: metadata search, aggregate analytics, raw analytics, data entry values, tracker events/enrollments, and org unit hierarchy. Minor gaps like org unit group analytics are covered by raw analytics, and write operations are out of scope.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that provides health data from the Senechal API to LLM applications, enabling AI assistants to access, analyze, and respond to personal health information.
    GPL 3.0
  • A
    license
    Not graded
    quality
    F
    maintenance
    A Model Context Protocol server that connects AI tools to Electronic Health Records using SMART on FHIR, allowing secure searching, querying, and analysis of patient data from compatible EHRs.
    86
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    Bridges your Nightscout CGM data with AI assistants via the Model Context Protocol, enabling natural language queries about glucose readings, treatments, statistics, and pattern analysis.
    21
    -