Skip to main content
Glama

Query Insights report

query_insights_report
Read-onlyIdempotent

Execute saved report queries using the same formulas and scope compiler as the Insights UI. Optionally override dates, comparison, filters, or breakdown. Returns structured rows and individual query errors. Check integration status for external sources; missing data is not measured zero. Use these results to answer questions or create a native artifact with create_artifact. Reading or querying does not create a report or artifact.

Input Schema

NameRequiredDescriptionDefault
scopeNoOverride selected report defaults. Filters replace the default filter list; omitted fields retain the report's defaults.
queryIdsNoQuery IDs from get_insights_report. Omit to run all queries (at most 30 per call).
reportIdYesReport file ID from list_insights_reports, or the final UUID in its Insights URL.
projectIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / properties / projectId / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    • removedInput schema / properties / reportId / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  2. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), so the description's added value here is real: it discloses that individual query errors return alongside rows (partial failure), and that missing data is not treated as measured zero. Those are non-obvious behaviors an agent would otherwise misread as clean zero-metrics. No return-shape detail beyond "structured rows," but annotations lift the burden.

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?

Six short sentences, no waste: identity first, then override behavior, then return shape, then the data-integrity caveat, then the follow-on tool. Each sentence carries distinct information and the most decision-relevant constraints (non-mutation, one-call orchestration) are surfaced early.

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 nested-schema, no-output-schema read tool this covers what an agent needs: what runs, how to override, what comes back including errors, and what not to assume about missing data. A minor gap is that it doesn't hint at the 30-query cap or the row grain (dimensions vs metrics), both left entirely to the schema.

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?

The description names the four override dimensions (dates, comparison, filters, breakdown), mapping them onto the nested scope object, and the schema itself carries a description for scope plus queryIds/reportId. With 75% coverage the schema does most of the work, but the sentence "Optionally override..." correctly signals overrides are additive-to-defaults rather than required.

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 and resource ("Execute saved report queries") and pins the semantics to the Insights UI's own formula and scope compiler. It then explicitly disclaims what the tool does NOT do ("Reading or querying does not create a report or artifact"), which separates it from create_artifact and implies separation from get_insights_report/list_insights_reports.

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?

Gives clear downstream routing: check integration status for external sources, use results to answer questions, or create_artifact to persist. What's missing is an explicit pointer to the sibling that fetches the report definition/query IDs (get_insights_report) versus when to use query_replo_analytics instead — the agent has to infer those from sibling names.

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