Skip to main content
Glama

Eleições 2026: Dados Públicos do TSE

eleicoes_consulta_sql

Read-onlyIdempotent

Executa UM SELECT (ou WITH … SELECT) somente leitura nas tabelas públicas da eleição (veja eleicoes_esquema antes). Um pré-voo pelo plano do SQLite estima as linhas lidas e recusa acima de 5 milhões sem executar, com sugestões para estreitar. Timeout de 5 s; até 1.000 linhas (padrão 100), com o SQL executado, o tempo e as linhas lidas.

Input Schema

NameRequiredDescriptionDefault
anoNo
sqlYes
limiteNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, yet the description adds substantive behavior the agent could not otherwise know: a SQLite plan pre-flight that estimates rows read and rejects over 5M without executing, a 5 s timeout, a 1,000-row cap with default 100, and what is returned (executed SQL, elapsed time, rows read). This is exactly the kind of context that matters for a query-execution tool.

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?

A single dense paragraph that front-loads the core operation and then adds the cost/timeout/row-limit constraints in order of operational importance. Every clause carries information, though the final clause about return fields is slightly compressed.

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

Completeness4/5

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

No output schema exists, and the description does cover the return payload (SQL executed, time, rows read) as well as failure conditions. The gaps are the unexplained 'ano' parameter and the absence of any note on how errors or rejections are surfaced, which keeps it short of fully complete.

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 coverage is 0%, so the description must compensate, and it partly does: the row cap and its default of 100 clearly map to 'limite', and the accepted SQL form is specified for 'sql'. However, the 'ano' parameter is never mentioned in the description or the schema, leaving one of three parameters fully undefined.

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: 'Executa UM SELECT (ou WITH … SELECT) somente leitura nas tabelas públicas da eleição', including the scope limit (single read-only statement, public election tables). It also points to the sibling eleicoes_esquema as a prerequisite, which lets an agent distinguish this from the schema-introspection tool without opening either schema.

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?

Gives a clear precondition ('veja eleicoes_esquema antes') and explains the refusal path above 5 million estimated rows with suggestions to narrow the query. It stops short of naming eleicoes_estimar_sql as the cheap way to preview cost, so the alternative-routing guidance is implied rather than explicit.

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.