Skip to main content
Glama

run_insight_query

Read-only

Build and execute an ad-hoc insight analytics query. Returns chart data for rendering plus a compact summary for analysis. A global filter or breakdown on a property or argument needs that column, with the same dataType, on every event metric's event; put a condition that applies to every metric in the global filters once (not also per metric), and segment players by behavior with a cohort filter or breakdown. Load the insight-queries skill (load_skill("insight-queries")) first.

Input Schema

NameRequiredDescriptionDefault
specYes
titleYesA short, lean chart title describing WHAT is measured (e.g. 'Daily active users'). Do NOT include the time range or dates — the chart shows the time range as a separate subtitle.
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

A3.8/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 safety is covered. The description adds useful behavioral context beyond annotations: it discloses the return format ('chart data for rendering plus a compact summary for analysis') and specific constraints about how filters and breakdowns must be structured relative to event metrics.

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 description is front-loaded with the purpose and contains no filler. The middle sentence is long and dense, but every part conveys a specific construction rule or prerequisite, so it remains efficient despite being slightly hard to parse.

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?

Given the tool's high complexity (nested spec with many constraints), the description appropriately directs the agent to load the insight-queries skill for full guidance. It also covers return values and key filter/breakdown placement rules, though it cannot exhaustively document the deep schema, which is acceptable for this complexity level.

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 description coverage is 75%, so the baseline is 3. The description compensates by adding non-obvious structural semantics for the spec: global filters or breakdowns on a property/argument require matching columns with the same dataType on every event metric's event, conditions applying to all metrics belong in global filters once, and cohort filtering is suggested for behavioral segmentation.

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 states a specific verb+resource ('Build and execute an ad-hoc insight analytics query') and mentions return contents, making the core action clear. However, it does not explicitly differentiate from sibling tools like create_insight_query or execute_query, leaving ambiguity about when this ad-hoc execution path is preferred.

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

Usage Guidelines3/5

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

It provides structural rules for placing filters and breakdowns, and a prerequisite to load the insight-queries skill first. But it does not explicitly say when to use this tool versus create_insight_query or execute_query, so alternatives remain implied rather than stated.

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