Skip to main content
Glama

create_query

Destructive

Save a SQL query to Redash for reuse, scheduling, or dashboarding. Requires a data source ID and validation before saving.

Instructions

Save a new named SQL query to Redash so it can be reused, scheduled, visualized, or added to a dashboard. Behavior: creates the query and returns its new id, name, and created_at. Usage: get the data_source_id from list_data_sources and verify the SQL runs with run_query first; to change an existing query use update_query instead. Note: this only saves the query — use get_query_result to execute it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesDisplay name for the saved query
tagsNoOptional tags to categorize the query (e.g., ['finance', 'weekly'])
queryYesThe SQL statement to save
descriptionNoOptional human-readable description of what the query does
data_source_idYesID of the data source this query runs against (from list_data_sources)
Behavior4/5

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

Annotations already declare destructiveHint=true, indicating a mutation. The description adds behavioral detail: it creates the query and returns id, name, created_at. It also clarifies that it only saves, not executes, providing useful non-obvious context.

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 with each earning its place: purpose, behavior, usage/notes. Front-loaded with key action. No redundant or vague wording. Highly efficient.

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?

Given the tool's complexity, annotations (destructiveHint), and no output schema, the description covers all necessary context: what it does, return values, prerequisites, alternative tools, and limitations. Completely sufficient for correct invocation.

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

Parameters4/5

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

Schema coverage is 100% with parameter descriptions. The description adds usage context for data_source_id (get from list_data_sources) and query (verify with run_query), enhancing semantic understanding beyond the schema alone.

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 explicitly states 'Save a new named SQL query to Redash' with specific verb and resource. It also distinguishes from siblings by mentioning update_query for existing queries and get_query_result for execution.

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?

The description provides clear when-to-use guidance: it tells to get the data_source_id from list_data_sources and verify SQL with run_query first, and explicitly says to use update_query for changing an existing query. This helps the agent choose correctly.

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