Skip to main content
Glama
xmpuspus

ph-civic-data-mcp

by xmpuspus

COMELEC 2025 precinct election return

get_election_return
Read-onlyIdempotent

Retrieve the official vote tally for a specified precinct, including all national and local contests with candidate vote counts and shares.

Instructions

One precinct's official vote tally from the COMELEC 2025 archive.

Give the 8-digit precinct code from browse_election_results. Returns every national and local contest counted at that precinct, with each candidate's vote count and share. Examples:

get_election_return("28010001") Adams, Ilocos Norte, precinct 0001

On failure: a code that is not 8 digits gives validation_error true and data_status "invalid_request", with no request sent. A code the archive does not recognize (a 403 body carrying its AccessDenied marker) gives the same shape. A body missing 'information', where 'national' or 'local' is not a list, or where a contest carries a non-list nested 'candidates' value, gives data_status "indeterminate" with upstream_error true. Any other outage, including a 403 with no AccessDenied marker, gives data_status "unavailable" with upstream_error true and the real error in caveats.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
precinct_codeYes8-digit precinct code, such as "28010001".

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.0

TDQS

A4.7/5.0
Behavior5/5

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

The description goes far beyond the readOnlyHint/idempotentHint annotations by detailing exact failure modes: invalid 8-digit codes produce validation_error and 'invalid_request'; unrecognized codes produce a 403 with an AccessDenied marker; malformed payloads produce 'indeterminate'; and other outages produce 'unavailable' with the real error in caveats. This is exceptional 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose, then provides an example and a well-organized failure taxonomy. Every sentence serves a distinct purpose: defining the resource, explaining the input source and output, giving an example, and enumerating error shapes.

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 single-parameter read tool with an output schema present, the description fully covers what the tool returns, how to get the parameter, and every known failure mode. 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.

Parameters4/5

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

The input schema already documents precinct_code with an example, and the description reinforces that with the '28010001' example and the source instruction 'from browse_election_results.' It also adds parameter-validation behavior (non-8-digit codes return validation_error with no request sent), which goes 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 opens with a specific verb-resource pair: 'One precinct's official vote tally from the COMELEC 2025 archive.' It clearly distinguishes this tool from browse_election_results by stating the code comes from that browsing tool and that this returns all contests for a single precinct.

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 explicitly instructs the agent to obtain the 8-digit precinct code from browse_election_results, which is a concrete usage path. It does not, however, explicitly state when not to use this tool or name an alternative for browsing multiple precincts, though the single-precinct framing implies it.

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