Skip to main content
Glama
ElectionData MCP

ElectionData MCP

run_sql

Read-only

Execute read-only DuckDB SELECT queries on ElectionData.MY lake tables to retrieve election results, candidates, parties, and turnout data; row limits and truncation flags show when more rows exist.

Instructions

Run one read-only DuckDB SELECT on the lake tables. Default 200 rows, max 2000; truncated=true means more rows exist. Voter roll tables need LIMIT <= 10000 or an aggregate.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sql": "<sql>"
    },
    "name": "run_sql"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYes
limitNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds genuinely non-redundant behavior: a default 200-row cap, a 2000-row ceiling, the meaning of truncated=true, and a special LIMIT<=10000 rule for voter roll tables. It does not explain error behavior on invalid SQL, but the added context is substantial.

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?

Three short sentences, each carrying distinct information: the operation, the row caps and truncation signal, then the table-specific constraint. Nothing is repeated and the core operation is front-loaded.

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?

With an output schema present, the description needn't document return values, yet it still explains the truncated flag, which is helpful. The main remaining gap is that 'the lake tables' are never enumerated, so an agent must consult describe_dataset before writing valid SQL.

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%, so the description must carry parameter meaning, and it largely does: the sql parameter is scoped to a single read-only DuckDB SELECT against lake tables, and the limit parameter is bounded by 'Default 200 rows, max 2000.' The link between the stated 200/2000 numbers and the 'limit' parameter is slightly implicit rather than explicit.

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 states a specific verb and resource: 'Run one read-only DuckDB SELECT on the lake tables.' This clearly separates it from the domain-specific siblings (election_summary, search, seat_history) as the raw-query escape hatch, though it never explicitly names those alternatives as the preferred path.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It constrains usage implicitly by saying 'one read-only DuckDB SELECT' and by noting voter roll tables need a LIMIT or aggregate, which is real operational guidance. However, it never says when an agent should reach for run_sql versus the many purpose-built sibling tools, leaving that choice to inference.

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