Skip to main content
Glama

get_query_result

Read-only

Execute a saved query from Redash by its ID and retrieve the latest results as a table or JSON. Specify output format, row limit, and timeout.

Instructions

Run an existing saved query by its ID and return the latest results. Behavior: executes the query as stored in Redash and returns up to max_rows rows as a markdown table or JSON, with the column list and a truncation note. Usage: find the query_id with list_queries or get_query. Unlike run_query, this executes already-saved SQL rather than ad-hoc SQL, so the safety guard does not apply.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoOutput format: table (markdown) or jsontable
max_rowsNoMax rows to return (1 to 10000, default 100)
query_idYesID of the saved query to run (from list_queries)
timeout_secsNoQuery execution timeout in seconds (1 to 300, default 30)
Behavior4/5

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

Annotations declare readOnlyHint=true, and description adds that it executes stored SQL without mutation. Describes output format options (markdown table or JSON), max_rows limit, and truncation note. Does not contradict annotations; minor omission of error handling behavior.

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 sentences in two logical blocks: purpose+behavior, then usage guidance. Every sentence adds value, no redundancy. Nicely front-loaded with key action and result.

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 tool with 4 parameters and no output schema, the description covers how to obtain the query_id, what the tool does (execute saved query), output format choices, and truncation note. Lacks specifics about return values beyond format hints, but sufficient given the context.

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 description coverage is 100%; description adds no new meaning beyond the schema's parameter descriptions. Default values and constraints are already documented. Baseline score of 3 is appropriate.

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?

Clearly states 'Run an existing saved query by its ID' with a specific verb and resource. Distinguishes from siblings like run_query (saved vs. ad-hoc) and list_queries/get_query (finding vs. executing).

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 advises to find query_id via list_queries or get_query, and contrasts with run_query for ad-hoc SQL, noting that the safety guard does not apply. Provides 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.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/seob717/redash-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server