Skip to main content
Glama

Run a saved query

draxlr_run_saved_query
Read-onlyIdempotent

Run an existing saved query by its id and return the resulting rows. Works for both raw SQL and query-builder saved queries. Use draxlr_list_saved_queries or draxlr_get_query to get a queryId. To run ad-hoc SQL instead, use draxlr_run_query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number for pagination (default 1)
queryIdYesThe saved query id to run (from draxlr_list_saved_queries or draxlr_get_query)
pageSizeNoRows per page (default 25)
databaseIdNoThe database id the saved query belongs to (resolved from the query if omitted)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/openWorld=false, so safety is covered. The description adds genuine context beyond them: it works for both raw SQL and query-builder saved queries, and that it returns resulting rows. It does not discuss pagination behavior or whether results are truncated, keeping it short of a 5.

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, front-loaded with the action, then the prerequisite, then the alternative. No filler or repetition.

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 read-only query runner with no output schema, the description covers the action, the source of the required id, the acceptable query types, and the return shape (rows). Pagination semantics are left entirely to the schema, but nothing essential is missing.

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%, so queryId, page, pageSize and databaseId are already documented in the schema, including the fallback resolution of databaseId. The description adds no syntax or format detail beyond restating where queryId comes from, so the baseline of 3 applies.

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?

States a specific verb+resource: run an existing saved query by id and return resulting rows. It explicitly distinguishes itself from draxlr_run_query (ad-hoc SQL), so an agent can route correctly 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?

Gives explicit prerequisites (obtain a queryId via draxlr_list_saved_queries or draxlr_get_query) and names the alternative tool for a different intent (draxlr_run_query for ad-hoc SQL). That is when-to-use plus a named alternative.

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