Skip to main content
Glama
29N Elections MCP

29N Elections MCP

Get the 29N tally sheet of a polling station

elecciones29n_get_tally_sheet
Read-onlyIdempotent

Retrieve the official scanned tally sheet (acta de escrutinio) PDF for one polling station by its code, returning metadata and a resource link for the document.

Instructions

Use this tool to get the official tally sheet (acta de escrutinio) of ONE polling station:
the scanned PDF that the polling station sent after counting its votes.

WHEN TO USE IT:
When the user asks to see or check the tally sheet of a specific polling station, after
'elecciones29n_get_polling_stations' returned its code.

INPUT PARAMETERS (What it receives):
- params.mesa_code (str, required): polling station 'code' from
  'elecciones29n_get_polling_stations', e.g. '2807903650A'.
- params.chamber ('congreso' default | 'senado').

WHAT IT RETURNS:
- Metadata only (never the file contents): mesa_code, label, election_code, record_id,
  scope_id, sent_at, processing_state, processing_date, document_type, mime_type,
  size_bytes and sha256 of the PDF.
- resource_uri: 'elecciones29n://tally-sheet/{chamber}/{mesa_code}'. Read that resource
  (resources/read) to get the PDF; the result also carries it as a resource link.
- next_step and source.

OPERATING NOTES:
- Tally sheets exist only when the website reports 'scrutiny_records_available' (see
  'elecciones29n_get_status') and only for polling stations already counted.
- This endpoint is inferred from the website code and has not been validated live yet.
- The figures of a tally sheet are not machine-read: use 'elecciones29n_get_scope_results'
  for results.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "params": "<params>"
    },
    "name": "elecciones29n_get_tally_sheet"
  }
}

Input Schema

NameRequiredDescriptionDefault
paramsYes

Output Schema

NameRequiredDescriptionDefault
labelNoShort label shown by the website: district-section-letter.
letterNo
sha256YesSHA-256 checksum (hex) of the decoded PDF.
sourceYes
chamberYes
sectionNo
sent_atNoWhen the tally sheet was sent (sendDate).
districtNo
scope_idNoscope_id of the polling station.
mesa_codeYes
mime_typeNoapplication/pdf
next_stepYes
record_idNoIdentifier of the tally sheet record.
size_bytesYesSize of the decoded PDF in bytes.
resource_uriYesMCP resource that serves the PDF (read it with resources/read).
document_typeNoDocument type (1 = scrutiny tally sheet).
election_codeYesElection code of the chamber in the API (2 Congreso, 3 Senado).
processing_dateNo
processing_stateNoProcessing state reported by the API.
municipality_codeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations (readOnly, idempotent, non-destructive), the description discloses a key behavioral trait: it returns metadata only and never file contents, requiring a follow-up resources/read on the returned resource_uri. It also volunteers availability constraints (only for counted stations when scrutiny_records_available is reported) and an honest caveat that the endpoint is inferred and not validated live.

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?

Sectioned headers (WHEN TO USE IT, INPUT PARAMETERS, WHAT IT RETURNS, OPERATING NOTES) are strongly front-loaded around the one-line purpose statement, and each block carries distinct information. It is somewhat verbose for a two-parameter tool, with mild repetition of schema-documented parameter text.

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?

Covers everything an agent needs: input provenance, the metadata field list, the resource URI pattern for retrieving the PDF, availability prerequisites, and an explicit warning about unvalidated behavior. The output schema exists, yet the return summary and resource_uri convention add essential workflow context not derivable from it.

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 description explains that mesa_code must come from the 'code' field of elecciones29n_get_polling_stations with a concrete example, and clarifies the chamber choice and default. With reported schema description coverage at 0%, this fully compensates, though the wording largely mirrors what the schema's own property descriptions already say, adding little additional 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?

States a specific verb and resource ('get the official tally sheet (acta de escrutinio) of ONE polling station: the scanned PDF') and pins the scope to exactly one station. This distinguishes it cleanly from siblings such as elecciones29n_get_scope_results (figures) and elecciones29n_get_polling_stations (codes).

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?

Provides an explicit 'WHEN TO USE IT' section tied to a precondition (after 'elecciones29n_get_polling_stations' returned its code) and states what NOT to use it for ('the figures of a tally sheet are not machine-read: use elecciones29n_get_scope_results'). It also names the availability gate via 'elecciones29n_get_status' and 'scrutiny_records_available', giving both when and when-not guidance.

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