Skip to main content
Glama

run_query

Read-onlyIdempotent

Execute a typed analytics plan without AI or SQL to retrieve totals, time series, breakdowns, or event counts with filters.

Instructions

Execute a typed analytics plan without AI or SQL. Fields: metric (pageviews|visitors|sessions|events|event_count), mode (total|timeseries|breakdown), event_name (required for event_count), dimension (for breakdown), interval (day|hour), date_from/date_to (ISO UTC), limit (1..100), filters ([{field, values}]). Filter fields: path, utm_source, utm_medium, utm_campaign, device, browser, os, country, event. Filters are ANDed; values within each filter are ORed. Returns resolved plan and caveats. Example: {"metric":"event_count","event_name":"signup","mode":"breakdown","dimension":"device"}.

Input Schema

NameRequiredDescriptionDefault
planYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/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, closed-world), so the bar is lower. The description adds genuinely behavioral detail beyond the schema: filters are ANDed while values within a filter are ORed. It also notes the response includes resolved plan and caveats, though the output schema already covers that.

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-loads purpose, then fields, then filter semantics, then a concrete example. Dense but every element is functional; slightly repetitive in listing filter fields also found in the example/schema, but not wasteful overall.

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?

Covers the nested plan fields, cross-field dependencies, filter combination logic, and a worked example, which is substantial for a complex tool. An output schema exists so return values need not be spelled out, but default-value behavior on omitted fields is left to the schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry the load, and it does: it enumerates all plan fields, explains allowed values per field, states the cross-field constraint that event_name is required for event_count and dimension is for breakdown, gives date format (ISO UTC), limit range, and filter shape. This adds meaning the schema alone does not convey.

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 (Execute) and resource (typed analytics plan), and the phrase 'without AI or SQL' distinguishes it from the sibling 'ask' tool that presumably handles natural-language queries. It is clear what the tool does, though it doesn't name the alternative explicitly.

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?

'Without AI or SQL' implies when this deterministic structured path is preferred over an NL/SQL path, but there is no explicit statement of when to use it versus siblings like query_metrics, breakdown, or ask. Usage is inferred rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.