Skip to main content
Glama

get_query

Read-only

Fetch one saved analytics query by id with its full definition as an editable spec (the same spec format run_insight_query / run_funnel_query / run_retention_query take, tagged with queryType) and the dashboards it appears on. Read a query with this before changing it: pass the edited spec (without queryType) to update__query, or use update_query to only rename it. When the query uses options agents cannot author, spec is omitted and notEditable says why. Load the manage-dashboards skill (load_skill("manage-dashboards")) first.

Input Schema

NameRequiredDescriptionDefault
queryIdYesThe id of the saved query (from list_queries or get_dashboard).
projectIdYesThe project (application) id to scope this call to. Use list_projects to discover valid ids.
environmentYesThe environment name to scope this call to (e.g. 'production'). Use list_projects to discover the names available to this token.

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 readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds real behavioral context beyond that: a conditional response shape where `spec` is omitted for options agents cannot author, plus a `notEditable` field explaining why, and a skill-loading prerequisite. It stops short of describing error behavior or the dashboard-list shape, keeping it at a 4.

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?

The purpose and return contents are front-loaded in the first sentence, with editing workflow and the editability caveat following in priority order. It is dense but nearly every clause carries actionable information; the skill-loading note at the end is slightly tacked on but useful.

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?

There is no output schema, so the description must describe the return values, and it does: the editable spec tagged with queryType, the dashboards it appears on, and the notEditable degradation case. Combined with the prerequisite and the follow-up update path, an agent has everything needed for a 3-required-param read tool.

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 coverage is 100% and every parameter carries a description pointing to discovery tools (list_queries, get_dashboard, list_projects), so the schema does the heavy lifting. The description adds only indirect meaning ("by id", "without queryType") and says nothing about projectId or environment scoping.

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?

Opens with a specific verb and resource: "Fetch one saved analytics query by id with its full definition as an editable spec ... and the dashboards it appears on." It also disambiguates from siblings by naming the exact spec format that run_insight_query / run_funnel_query / run_retention_query consume and by naming update_query separately.

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 when-to-use guidance ("Read a query with this before changing it") and routes to the correct alternatives: pass the edited spec to update_<queryType>_query, or use update_query for rename-only. It also states a prerequisite (load the manage-dashboards skill first) rather than leaving it to inference.

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