Skip to main content
Glama

plausible-analytics

Query stats

plausible_query_stats
Read-only

The full-power Stats API query. Compute metrics over a date range, optionally grouped by dimensions and narrowed by filters, with ordering, includes, and pagination. Plausible: POST /api/v2/query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filtersNoOptional filters. Each is an array like ["is","visit:country_name",["Estonia"]] or ["contains","event:page",["/blog"]] with logical wrappers ["and",[...]] / ["or",[...]] / ["not",[...]]. Operators: is, is_not, contains, contains_not, matches, matches_not, has_done, has_not_done.
includeNoOptional include flags: { imports?, time_labels?, total_rows? }.
metricsYesMetrics to compute. Any of: visitors, visits, pageviews, views_per_visit, bounce_rate, visit_duration, events, scroll_depth, percentage, conversion_rate, group_conversion_rate, average_revenue, total_revenue, time_on_page.
site_idYesThe site's domain as registered in Plausible, e.g. "example.com".
order_byNoOptional ordering: an array of [metric_or_dimension, "asc"|"desc"] pairs, e.g. [["visitors","desc"]].
date_rangeYesDate range: a shortcut string ("day", "7d", "28d", "30d", "91d", "month", "6mo", "12mo", "year", "all", "24h") OR a 2-element ISO8601 array like ["2024-01-01","2024-07-01"] (dates or datetimes with tz).
dimensionsNoGroup-by dimensions. Event dims (event:goal, event:page, event:hostname), visit dims (visit:source, visit:referrer, visit:utm_medium/source/campaign, visit:device, visit:browser, visit:os, visit:country/region/city[_name], visit:entry_page, visit:exit_page), time dims (time, time:hour, time:day, time:week, time:month), or custom props (event:props:<name>). Omit for totals.
paginationNoOptional pagination: { limit?, offset? }.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true, so the safety profile is known. The description adds no behavioral context such as response format, pagination behavior, or potential large result sets. It does not contradict the annotation but provides no additional disclosure.

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 short and front-loaded with the tool's identity. The endpoint reference 'POST /api/v2/query' is arguably redundant but not harmful, so it earns high marks for conciseness.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is complex with eight parameters and nested objects, and there is no output schema to explain return values. The description provides only a one-sentence capability summary without usage context or expected response, leaving the agent to rely solely on the schema.

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

Parameters3/5

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

All parameters have descriptions in the input schema, so the baseline is 3. The description's mention of 'optionally grouped by dimensions and narrowed by filters' is a high-level overview that adds little beyond the schema's explicit parameter documentation.

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 clearly states it computes metrics over a date range and supports grouping, filtering, ordering, and pagination. It identifies it as the 'full-power Stats API query', giving a clear sense of its role. However, it does not explicitly differentiate it from sibling tools like aggregate or timeseries.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus siblings such as plausible_aggregate or plausible_timeseries. The phrase 'full-power' implies generality but does not specify exclusions or when a simpler tool would suffice.

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.

TDQS

A3.7/5.0
Disambiguation4/5

Tools are mostly distinct: aggregate, breakdown, timeseries, and realtime_visitors each serve a specific query pattern, while query_stats is the general-purpose fallback. Minor overlap exists because query_stats can reproduce what the convenience wrappers do, but descriptions clarify the intended use.

Naming Consistency4/5

All tools share the plausible_ prefix and use lowercase with underscores, which is consistent. However, some names are single verbs/nouns (aggregate, breakdown, timeseries) rather than a uniform verb_noun pattern like list_sites, so there's a slight stylistic inconsistency.

Tool Count5/5

8 tools is a well-scoped size for an analytics server. It covers the main query types (totals, breakdowns, time series, realtime) plus site and goal listing, without being bloated or insufficient.

Completeness4/5

The server covers the core analytics surface: querying metrics with aggregation, breakdown, timeseries, and realtime, plus site and goal metadata. Minor gaps exist like goal creation or site management, but these are likely outside the intended read-only analytics scope.