Skip to main content
Glama

report_query

Read-only

Query aggregated analytics data using structured JSON queries.

Build queries using measures, dimensions, filters, time dimensions, and ordering discovered via report_schema. No SQL required — queries are structured JSON objects. Only public views (those listed by report_schema) can be queried.

Tenant isolation is enforced server-side; the agent cannot access other tenants' data.

Example query: { "measures": ["billing_overview.total_bills", "billing_overview.total_amount"], "dimensions": ["billing_overview.status"], "filters": [{"member": "billing_overview.status", "operator": "equals", "values": ["approved"]}], "timeDimensions": [{"dimension": "billing_overview.created_at", "dateRange": "Last 30 days", "granularity": "day"}], "order": {"billing_overview.total_amount": "desc"}, "limit": 100 }

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "report_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum rows to return (default 5000, max 50000)
orderNoSort order: {"member_name": "asc" | "desc"}
filtersNoArray of filter conditions
measuresNoArray of measure names to aggregate, e.g. ["billing_overview.total_bills"]
dimensionsNoArray of dimension names to group by
timeDimensionsNoArray of time dimension configurations

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already cover the safety profile (readOnlyHint, destructiveHint=false, openWorldHint=false), so the description's added value is the server-side tenant isolation guarantee and the public-view restriction, both genuinely useful behavioral facts. Beyond that it says nothing about result shape, truncation behavior at the row cap, or what happens when a member is invalid, which matters for a query tool with no output schema.

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?

Front-loaded with the purpose, then the workflow prerequisite, then the scoping constraint, then the example. The prose is tight; the JSON example is long but earns its space given the nested query structure. Minor redundancy between 'structured JSON queries' in the first line and 'queries are structured JSON objects' later.

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 six-parameter tool with nested objects and no output schema, the description covers query construction, member discovery, access scoping, and a concrete example. The remaining gap is the return format and row-cap behavior, which an agent would want to know since no output schema exists to describe results.

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; the description earns a point above that by showing a complete worked example where measures, dimensions, filters, timeDimensions, and order are used together, illustrating the cross-parameter relationships (fully qualified cube.field naming, filter member matching a dimension) that the schema documents only in isolation.

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?

States a specific verb and resource ('Query aggregated analytics data') and distinguishes itself from SQL-based siblings with 'No SQL required — queries are structured JSON objects.' It does not name report_schema_detail, table_query, or datastore_query directly, so an agent still has to infer which of those handles non-aggregated data, but the aggregate-analytics scope is unambiguous.

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 a clear prerequisite workflow: members must be discovered via report_schema, and only public views listed there can be queried. It does not state when to prefer this over table_query or datastore_query for raw-row retrieval, so the exclusion side of the guidance is only implied.

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.