Skip to main content
Glama
joelgombin

André — Analyse électorale française

Requête SQL (lecture seule)

query_sql
Read-onlyIdempotent

Execute direct SQL queries on French election data for advanced ad hoc analysis.

Instructions

Exécute une requête SQL directe sur la base DuckDB (read-only).

Tables principales :

  • general_results : résultats généraux par bureau de vote

  • candidats_results : résultats par candidat par bureau de vote

  • elections_disponibles : liste des élections (id_election, nb_bureaux, total_inscrits)

  • candidats_avec_nuances : candidats avec famille politique (si nuances enrichies)

  • resultats_par_famille : résultats agrégés par famille politique

  • communes, epci, departements, regions : divisions administratives

  • bv_sociodemographique : données socio-démo par bureau de vote

ATTENTION — colonnes de general_results (noms avec espaces, à quoter) : id_election, id_brut_miom, "Code du département", "Code de la commune" (SANS préfixe dept, ex: '055' pour Marseille), "Libellé de la commune", Inscrits, Abstentions, Votants, Blancs, Nuls, Exprimés.

PRÉFÉRER query_elections pour les analyses standard — query_sql est pour les requêtes ad hoc avancées.

Exemple : SELECT id_election, ROUND(100.0 * SUM(Abstentions) / NULLIF(SUM(Inscrits), 0), 1) as abstention_pct FROM general_results WHERE "Code du département" = '13' AND "Code de la commune" = '055' GROUP BY id_election ORDER BY id_election DESC LIMIT 5

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Beyond annotations (readOnlyHint, idempotentHint, destructiveHint), the description adds critical behavioral context: the database is DuckDB read-only, column names with spaces must be quoted, and lists important tables and columns. No contradictions.

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 concise, well-structured, and front-loaded with the primary purpose. Every sentence adds value: purpose, tables, warnings, usage guidance, example. No wasted words.

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?

Given the tool complexity (SQL query, multiple tables, quoting needs), the description is complete. It provides table schemas, column details, usage guidance, and an example. Output schema exists, so return values are covered.

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?

Schema coverage is 0% for the single parameter 'query', but the description compensates with extensive context: table listings, column names with quoting rules, and a realistic example query. However, it does not formally describe the parameter structure or constraints.

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 clearly states the verb (exécute) and resource (requête SQL directe sur DuckDB) and distinguishes itself from sibling query_elections by emphasizing its use for advanced ad hoc queries.

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?

Explicitly states when to use this tool vs alternatives: 'PRÉFÉRER query_elections pour les analyses standard — query_sql est pour les requêtes ad hoc avancées.' Provides clear guidance.

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/joelgombin/andre-mcp'

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