Skip to main content
Glama
karnagge

MCP DivulgaCandContas Server

by karnagge

listar_eleicoes_suplementares

Retrieve supplementary election data for specific Brazilian states and years from the TSE's official electoral database.

Instructions

Lista eleições suplementares em um estado e ano específicos

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
anoYesAno da eleição (ex: 2020)
ufYesSigla da unidade federativa (ex: SP, RJ)

Implementation Reference

  • The handler case for 'listar_eleicoes_suplementares' that validates input parameters using Zod schema, makes an HTTP GET request to the API endpoint for supplementary elections in a specific state and year, and returns a formatted text response with the results.
    case "listar_eleicoes_suplementares": { const params = EleicoesSuplementaresEstadoSchema.parse(args); const data = await handleApiRequest(() => httpClient.get(`/eleicao/suplementares/${params.ano}/${params.uf}`) ); return { content: [ { type: "text", text: `Eleições suplementares em ${params.uf} (${params.ano}): ${data.length}\n\n` + JSON.stringify(data, null, 2) } ] }; }
  • Zod schema defining the input parameters for the tool: 'ano' (election year) and 'uf' (state abbreviation). Used for validation in the handler.
    const EleicoesSuplementaresEstadoSchema = z.object({ ano: z.number().int().min(2000).max(new Date().getFullYear()), uf: z.string().length(2) });
  • src/index.ts:184-204 (registration)
    Tool registration in the ListTools response, including name, description, and input schema metadata that clients use to understand and call the tool.
    { name: "listar_eleicoes_suplementares", description: "Lista eleições suplementares em um estado e ano específicos", inputSchema: { type: "object", properties: { ano: { type: "number", description: "Ano da eleição (ex: 2020)", minimum: 2000, maximum: new Date().getFullYear() }, uf: { type: "string", description: "Sigla da unidade federativa (ex: SP, RJ)", pattern: "^[A-Z]{2}$" } }, required: ["ano", "uf"] } },

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/karnagge/mcpcand'

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