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"]
      }
    },
Behavior2/5

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

No annotations are provided, so the description carries full burden. It describes a read operation ('Lista') but doesn't disclose behavioral traits like whether it returns all results or is paginated, what format the output takes, error conditions, or any rate limits. The description is minimal and lacks operational context.

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, efficient sentence that directly states the tool's purpose without any fluff. It is appropriately sized and front-loaded, with every word contributing to understanding the tool's function.

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

Completeness2/5

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

Given no annotations and no output schema, the description is incomplete for a tool with two required parameters. It lacks information on output format, error handling, or behavioral details, leaving significant gaps for an AI agent to understand how to use it effectively.

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%, with both parameters ('ano' and 'uf') well-documented in the schema. The description mentions these parameters ('estado e ano específicos') but adds no meaning beyond what the schema already provides, such as explaining why these filters are necessary or their impact on results.

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 action ('Lista' - lists) and resource ('eleições suplementares' - supplementary elections) with specific filtering criteria ('em um estado e ano específicos' - in a specific state and year). It distinguishes from obvious siblings like 'listar_eleicoes_ordinarias' by specifying 'suplementares' vs 'ordinarias', though it doesn't explicitly contrast them.

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?

The description provides no guidance on when to use this tool versus alternatives like 'listar_eleicoes_ordinarias' or 'listar_anos_eleitorais'. It states what it does but offers no context about appropriate use cases, prerequisites, or exclusions.

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

Install Server

Other Tools

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