Skip to main content
Glama
PNCP Athena MCP Server

PNCP Athena MCP Server

by jsantos-aie

run_read_only_query

Run validated read-only Athena SQL on Brazilian public procurement data. Filter by uf and dt partitions to avoid 100 MB scan limits, with results capped at 50 rows.

Instructions

Valida e executa uma consulta SQL somente leitura no Amazon Athena (máximo de 50 linhas). Sempre filtre pelas partições uf e dt quando disponíveis para evitar estourar o limite de 100 MB por query.

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_read_only_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and delivers real behavioral facts: the query is validated before execution, results are capped at 50 rows, and scans are bounded at 100 MB per query. It does not cover error/validation-failure behavior, timeouts, cost implications, or the shape of returned rows, leaving some gaps for a mutation-free but potentially expensive operation.

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?

Two sentences, both front-loaded with the essential facts: what is executed and the 50-row cap first, then the scan-limit guardrail. Every clause (read-only, validation, limits, partition filter) carries information an agent would otherwise have to guess.

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?

For a one-parameter tool with no annotations and no output schema, the description covers the critical risks: read-only enforcement, row cap, and the 100 MB scan constraint with the mitigation. The remaining omission is what happens on validation failure and what the result rows look like, which matters because no output schema exists to answer that.

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% for the single sql parameter, so the description must compensate. It adds meaningful constraints on acceptable input (read-only SQL, partition predicates on uf and dt), but omits the engine dialect, how identifiers or the target database are specified, and whether non-SELECT statements are rejected at validation.

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?

States a concrete verb pair and resource: validates and executes a read-only SQL query on Amazon Athena, with a 50-row cap. The operation type (ad-hoc query execution) is inherently distinct from the metadata siblings describe_table and list_tables, though the description never names them or draws the boundary explicitly.

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?

Gives one strong imperative about query construction: always filter on partitions uf and dt when available to avoid the 100 MB scan limit. That is genuinely actionable, but there is no guidance on when to reach for this tool versus describing or listing tables, and no statement of preconditions such as the database/catalog to target.

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

Deploy Server

Other Tools