Skip to main content
Glama

André — Analyse électorale française

Requête SQL (lecture seule)

query_sql
Read-onlyIdempotent

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

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true. The description adds the context that it runs on DuckDB, mentions column naming quirks, and gives an example, but does not disclose additional behavioral traits like rate limits or error handling. This is adequate given annotation coverage.

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?

Well-structured with sections (tables, attention, prefer, example). The description is somewhat long but every section adds value. Front-loaded with purpose.

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's complexity (SQL querying with multiple tables and column quirks), the description covers table names, column details, usage guidance, and an example. Output schema exists and annotations are comprehensive, so no missing context.

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 only parameter 'query' has 0% schema description coverage, but the description compensates by listing table names, column details with quoting requirements, and a concrete example. This provides significant meaning beyond the schema.

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 it executes a direct SQL query on DuckDB (read-only), lists main tables, and distinguishes from sibling tool query_elections by specifying that query_sql is for advanced ad hoc queries. The verb 'execute' and resource 'DuckDB SQL' are specific.

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 says to prefer query_elections for standard analyses and that query_sql is for advanced ad hoc queries, providing clear when-to-use and when-not-to-use guidance.

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.

TDQS

A3.7/5.0
Disambiguation4/5

The query_* tools are mostly cleanly separated by domain (elections, admin, DLP, élus, sociodem), and the output-oriented tools (map, table, visualization, export) are distinct. The main potential confusion is query_sql versus query_elections, since both can access election results, but the descriptions mitigate this by explicitly recommending query_elections for standard analysis.

Naming Consistency5/5

All tool names follow a consistent lowercase snake_case verb-first convention: query_* for data retrieval, and create_data_table, export_data, generate_map, simulate_fusions, and visualize for actions. There is no mixing of camelCase, inconsistent verb styles, or vague duplicate-like naming.

Tool Count5/5

With 11 tools, the server is well within the ideal scope for a specialized electoral analysis toolset. Each query tool covers a coherent data domain, while mapping, visualization, export, table formatting, and simulation cover distinct workflow needs without redundancy.

Completeness5/5

The tool surface covers the full electoral analysis workflow: querying results and administrative divisions, socio-demographic profiles, elected officials, municipal candidate data, mapping, custom visualizations, tabular formatting, export, and fusion simulation. The advanced panel actions in query_elections plus the read-only SQL fallback fill most conceivable gaps.