Skip to main content
Glama

execute_query

Read-only

Execute a saved analytics query (insight, funnel, retention, or heatmap) and return its results. Supports overriding the time range and (except for heatmaps) breakdowns; the result is rendered as a chart for the user automatically. Load the run-analytics-query skill (load_skill("run-analytics-query")) first.

Input Schema

NameRequiredDescriptionDefault
timeNoOptional time range override. Replaces the saved query's time when provided.
queryIdYesThe id of the saved query to execute.
projectIdYesThe project (application) id to scope this call to. Use list_projects to discover valid ids.
breakdownsNoOptional breakdown dimensions override. Replaces the saved query's breakdowns when provided.
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

A3.9/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, and the description adds real value on top: the automatic chart rendering is a visible side effect the agent should know about, and the heatmap breakdown exclusion is a genuine behavioral limit not encoded in the schema. It still omits error behavior, whether the chart render is suppressible, and what the raw result payload looks like.

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?

Three sentences, no filler, with the core action stated first and constraints following. The skill-loading prerequisite is arguably the most critical instruction yet sits last, which is a minor front-loading weakness rather than a wording problem.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 carries the burden of explaining returns, and 'return its results' plus 'rendered as a chart' is thin for a tool whose payload is the whole point. For a 5-parameter tool with a deeply nested time-range schema, the absence of any guidance on relative-vs-absolute time construction leaves a meaningful gap.

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%, so the baseline is 3, but the description earns above that by clarifying that `time` and `breakdowns` are overrides that replace the saved query's stored values, and by flagging that `breakdowns` does not apply to heatmaps. It does not explain how to choose between the relative and absolute branches of the nested `time` object, which is the most error-prone part of the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource ('Execute a saved analytics query') and enumerates the supported query kinds (insight, funnel, retention, heatmap). The word 'saved' plus the required queryId distinguishes it from the ad-hoc run_insight_query / run_funnel_query / run_retention_query / run_heatmap_query siblings, though it never names them explicitly to confirm the distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a concrete prerequisite ('Load the run-analytics-query skill first') and states what can and cannot be overridden (breakdowns unsupported for heatmaps). What it lacks is an explicit routing rule: it never says when to prefer this over the sibling run_*_query tools or get_query, so the agent must infer that this is the path for an already-saved query.

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