Skip to main content
Glama
Plausible Analytics MCP Server

Plausible Analytics MCP Server

by er1carruda

get_aggregate

Retrieves aggregate Plausible Analytics metrics for a specified date range, including visitors, pageviews, bounce rate, and visit duration, with optional filters.

Instructions

Get aggregate analytics metrics for a time period. Metrics can include: visitors, visits, pageviews, views_per_visit, bounce_rate, visit_duration, events. Date range examples: '7d', '30d', 'month', 'year', 'all', or ['2024-01-01', '2024-03-01'].

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "metrics": "<metrics>",
      "date_range": "<date_range>"
    },
    "name": "get_aggregate"
  }
}

Input Schema

NameRequiredDescriptionDefault
filtersNoOptional filters, e.g. [["is", "visit:source", ["Google"]]]
metricsYesMetrics to retrieve, e.g. ['visitors', 'pageviews', 'bounce_rate']
date_rangeYesDate range: '7d', '30d', 'month', 'year', 'all', or ['YYYY-MM-DD', 'YYYY-MM-DD']

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden, yet it only implies a read operation via 'Get'. It says nothing about permissions, rate limits, response shape, metric compatibility (e.g. bounce_rate with events), or behavior when an invalid metric is requested.

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 compact sentences, front-loaded with the purpose followed by the metric vocabulary and date-range examples. Nothing is padded, though the metric and date lists partly duplicate the schema.

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?

With no output schema, the description should describe the returned aggregate shape, but it never says what the response contains or how metrics map to result keys. The omission of the 'filters' parameter from the prose also leaves a minor gap against a 3-parameter tool.

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%, so the schema already documents all three parameters. The description reinforces the valid metric names and date-range formats, but adds no syntax or constraint meaning beyond the schema, making it a baseline case.

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: 'Get aggregate analytics metrics for a time period.' The word 'aggregate' implicitly distinguishes it from the breakdown/timeseries siblings, but the description never names an alternative to make the distinction explicit.

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?

Usage is implied by 'aggregate' and 'time period' but there is no explicit when-to-use versus the breakdown or timeseries siblings, and no guidance on combining metrics or when filters are appropriate.

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