Skip to main content
Glama
Plausible Analytics MCP Server

Plausible Analytics MCP Server

by er1carruda

plausible_query

Run an arbitrary Plausible Stats API v2 query for advanced traffic analysis beyond the built-in tools, covering custom metrics, dimensions, filters, ordering, and pagination.

Instructions

Execute an arbitrary Plausible Stats API v2 query. Use this for advanced analysis not covered by the other tools. See Plausible API v2 docs for full query syntax.

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": "plausible_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax results to return
offsetNoPagination offset
filtersNoFilters, e.g. [["is", "visit:source", ["Google"]]]
includeNoExtra includes, e.g. {time_labels: true}
metricsYesMetrics to retrieve, e.g. ['visitors', 'pageviews', 'events']
order_byNoSort order, e.g. [['visitors', 'desc']]
date_rangeYesDate range: '7d', '30d', 'month', 'year', 'all', or ['YYYY-MM-DD', 'YYYY-MM-DD']
dimensionsNoDimensions to group by, e.g. ['event:page', 'visit:source']

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden and does almost none of it. It never states that this is a read-only query, whether arbitrary queries are rate-limited or costlier than the fixed tools, how pagination interacts with limit/offset, or what the response looks like for an unrestricted query shape.

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?

Three short sentences, front-loaded with the core action and the routing caveat. The final sentence offloads syntax to external documentation, which is a minor waste versus inlining the key query structure, but nothing is padded.

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?

For an eight-parameter, nested-object, no-annotations, no-output-schema tool that executes arbitrary queries, the description is thin: no return shape, no note that results are grouped by dimensions/metrics, and no guidance on combining metrics with dimensions. Punting to external docs leaves the agent without in-context information for a fairly complex call.

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 coverage is 100% and the schema documents all eight parameters with examples (filters, order_by, dimensions, date_range formats). The description adds no meaning beyond that, deferring entirely to external Plausible API v2 docs, so the baseline 3 applies.

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 ('arbitrary Plausible Stats API v2 query'), which is clearly distinct from the narrow sibling tools like get_aggregate or get_timeseries. It does not name which siblings cover which standard queries, so differentiation is generic ('the other tools') rather than concrete.

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 an explicit routing rule: use this for advanced analysis not covered by the dedicated tools, implying the dedicated tools are the default for standard queries. It stops short of naming those alternatives or giving examples of what 'advanced' means, but the when-to-use signal is clear.

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