Skip to main content
Glama

Africa API — African Elections

africa.politics.elections
Read-onlyIdempotent

List presidential, parliamentary, and local government elections across all 54 African countries. Returns election scope (presidential/parliamentary/local), status (upcoming/completed/ongoing), dates, and country. Filter by country code, election status, or year range. Use status="upcoming" to find upcoming African elections relevant to political risk analysis or investment due diligence. Data sourced from Wikidata and official election commission records.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of elections to return (1–100, default 20).
statusNoFilter by election status: "upcoming" (future elections), "completed" (past elections), or "ongoing" (elections currently in progress).
end_yearNoFilter elections up to and including this year (e.g. 2025).
start_yearNoFilter elections from this year onwards (e.g. 2020).
country_codeNoISO 3166-1 alpha-2 country code to filter elections to a single country (e.g. "ng", "ke", "za", "eg"). Omit to return elections for all 54 countries.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent only when the call failed. Includes error code, message, request_id, and any provider-specific extras.
resultNoTool response payload. Shape varies per tool — consult the tool description and inputSchema. May be an object, array, string, or number depending on the upstream provider response.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint: false. The description adds useful behavioral context beyond those flags by stating data provenance (Wikidata and official election commission records) and detailing the returned fields and status vocabulary. Nothing contradicts the annotations.

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 three sentences, starts with the operation and resource, and efficiently covers output, filters, a use case, and data provenance. Every sentence earns its place, with no repetition of the title or schema details.

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 read-only list tool with fully documented optional parameters, an output schema, and safe annotations, this description is complete. It covers the resource scope, return content, filter options, a concrete use case, and data provenance, so nothing an agent needs to call it correctly is missing.

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 description coverage is 100%, so the baseline is 3. The description briefly summarizes the filterable dimensions (country, status, year range) and highlights the 'upcoming' status use case, but it does not add substantive parameter semantics beyond what the schema already provides.

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 names a specific verb ('List') and a well-defined resource: presidential, parliamentary, and local government elections across all 54 African countries. It also enumerates the returned fields (scope, status, dates, country), making the operation concrete and distinct from the sibling africa.* tools.

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?

It provides a concrete scenario: 'Use status="upcoming" to find upcoming African elections relevant to political risk analysis or investment due diligence.' This tells agents when the tool is valuable, but it does not explicitly discuss alternatives or exclusions; however, no sibling tool covers this exact domain, so the guidance is sufficient.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.