Skip to main content
Glama

get_query_results

Retrieve the output of a completed Athena query by providing its execution ID. Supports pagination and result limits for efficient data retrieval.

Instructions

Get results from a completed query

Args: query_execution_id: Query execution ID max_results: Maximum number of results to return next_token: Token for pagination

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
next_tokenNo
max_resultsNo
query_execution_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral burden. 'Get' signals read-only and 'completed query' gives a prerequisite, while next_token/max_results hint at pagination. However, it omits what happens with failed or cancelled queries, any limits on max_results, and the actual pagination mechanics.

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 one purpose sentence followed by a compact, scannable parameter list. No words are wasted, and the key action is front-loaded.

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

Completeness3/5

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

The output schema covers return values, so that omission is acceptable. However, for a tool with no annotations, the description leaves important operational context unstated: the query must have succeeded (not merely 'completed'), and next_token should likely be looped until null. It is minimally viable but with clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the parameter descriptions must compensate. max_results and next_token get brief purpose statements, but query_execution_id is a near-tautology and no constraints, defaults, or pagination relationships are explained. This only partially compensates for the empty schema.

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 names a concrete verb ('Get') and resource ('results from a completed query'), which clearly distinguishes it from status-oriented siblings like get_query_execution. It doesn't explicitly name an alternative, so it falls slightly short of a 5.

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?

'From a completed query' implies the tool should be used after query execution finishes, which is useful but implicit. It does not explicitly say when to use this tool versus get_query_execution or start_query_execution, nor does it tell the agent to verify query success first.

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