Skip to main content
Glama

Get a running query's result

get_query_result
Read-only

Collect the result of a query_data call that was still running.

Pass the query_id verbatim from a {"status": "running"} response. This attaches to the SAME extraction already in flight — it does not start a second one — and waits for it, so calling it costs nothing beyond the wait. Returns the normal {columns, rows, row_count, truncated} once the data lands, or another {"status": "running", query_id} if it is still going. A result with more rows than limit carries a next_cursor: pass it back here as query_id to read the next page.

Call it again immediately when it says running. There is no need to pause between calls: each one blocks on the run rather than polling it, so waiting before you ask only delays the answer by however long you waited. Never answer a still-running query by re-issuing query_data: that abandons the work in progress and starts the extraction over.

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": {
      "query_id": "<query_id>"
    },
    "name": "get_query_result"
  }
}

Input Schema

NameRequiredDescriptionDefault
query_idYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already cover read-only and safe-destructive semantics, and the description adds substantially more: it attaches to the existing in-flight extraction rather than starting a new one, it blocks rather than polls, there is no cost beyond the wait, and it returns either the full result envelope or another running status. These are exactly the non-obvious runtime traits an agent needs.

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?

Front-loaded with the core action and the acquisition rule, then the return shape, then the polling guidance, with the critical instruction bolded. Slight redundancy between 'waits for it, so calling it costs nothing beyond the wait' and the later 'each one blocks on the run rather than polling it' repeats the same point twice.

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?

Despite a single-parameter tool with an output schema, the description still explains the result envelope and the running-status case, plus pagination. Nothing an agent needs to invoke or re-invoke this tool correctly is absent.

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

Parameters5/5

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

Schema description coverage is 0%, so the description carries the full burden and does: query_id must be passed verbatim from the running response, and the same field is overloaded to accept a next_cursor for paging. That dual meaning is not inferable from the plain string 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 states a specific action on a specific resource — collecting the result of a still-running query_data call — and explicitly distinguishes it from the sibling that starts the extraction. An agent can tell it apart from query_data without opening either schema.

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?

It spells out the trigger condition (only after a {"status": "running"} response), instructs how to re-call (immediately, no pause, because each call blocks rather than polls), and names an explicit prohibition with the reason: never re-issue query_data, which would abandon work in flight. Pagination reuse of query_id via next_cursor is also covered.

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.

Resources