Skip to main content
Glama

Plausible MCP by usefulapi

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

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.

  1. 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"
  2. First observed

TDQS

B3.4/5.0
Behavior3/5

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

readOnlyHint=true already tells the agent this is a safe, non-mutating read, so the bar is lower. The description adds that it is a POST query endpoint (useful, since POST might otherwise suggest a write) and mentions pagination and includes exist, but says nothing about result-size limits, rate limits, or cost of large dimension cardinality queries.

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?

Two sentences, front-loaded with the capability statement and followed by grouping/filter/ordering/pagination details in one breath. The trailing 'Plausible: POST /api/v2/query.' is minor implementation trivia but compact enough not to bloat the definition.

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

Completeness3/5

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

For an 8-parameter tool with nested objects and no output schema, the description covers the request shape adequately but is silent on response structure and on the decision boundary against its seven siblings. Given the rich schema it is minimally sufficient, though an agent choosing among the query tools still lacks routing guidance.

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?

Schema description coverage is 100%, including detailed filter syntax, dimension enumerations, metric lists and date-range shortcuts, so the schema carries the semantics. The description only recaps the categories of parameters (dimensions, filters, ordering, includes, pagination) without adding format or constraint detail beyond the schema. Baseline 3 is appropriate.

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 concrete verb and resource: compute metrics over a date range with grouping, filters, ordering and pagination, backed by the concrete endpoint POST /api/v2/query. The phrase 'full-power' hints it is the superset of its siblings, but it never names them, so an agent cannot fully distinguish it from plausible_aggregate or plausible_breakdown without opening schemas.

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?

Calling itself 'the full-power Stats API query' weakly implies 'use this when the simpler tools are not enough', but there is no explicit when-to-use, when-not-to-use, or named alternative among plausible_aggregate, plausible_breakdown and plausible_timeseries. Usage must be inferred from the label alone.

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.