Skip to main content
Glama
Plausible Analytics MCP Server

Plausible Analytics MCP Server

by er1carruda

get_top_sources

Retrieves top traffic sources from Plausible Analytics by source, referrer, or channel for a chosen date range, helping identify which channels drive website visits.

Instructions

Get top traffic sources. source_type: 'source' = traffic source (e.g. Google), 'referrer' = full referrer URL, 'channel' = channel grouping (Organic Search, Direct, etc.).

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": {
      "date_range": "<date_range>"
    },
    "name": "get_top_sources"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoNumber of sources to return
filtersNoOptional filters, e.g. [["is", "event:page", ["/blog"]]]
date_rangeYesDate range: '7d', '30d', 'month', etc.
source_typeNoType of source breakdownsource

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3.1/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 behavioral burden, and it discloses very little beyond the source_type modes. It does not say what "top" is ranked by (visitors? events?), whether results are ordered, or how limit interacts with ranking. For a read-only analytics query the safety profile is inferable from "get", but the ranking semantics remain hidden.

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 with no filler, and the core action is front-loaded ahead of the parameter detail. The second sentence is a dense but efficient enumeration. Slight deduction because the terse opening leaves key concepts (ranking metric, result shape) unstated rather than merely compressed.

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 four parameters, one required, no output schema, and no annotations, the description covers the enum ambiguity well but leaves the ranking metric, result shape, and sibling boundaries unspecified. It is adequate to call the tool correctly, but not complete enough to call it confidently in preference to a neighboring breakdown tool.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline would be 3, but the description genuinely adds meaning: it disambiguates the enum by defining 'source' as the traffic source (e.g. Google), 'referrer' as a full referrer URL, and 'channel' as the grouping (Organic Search, Direct). Without this, 'referrer' versus 'source' would be guesswork. It adds nothing about limit, filters, or date_range, which the schema already covers.

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 opens with a specific verb and resource ("Get top traffic sources"), which is unambiguous on its own. It then spends its remaining text explaining the three source modes. It never contrasts itself with adjacent analysis tools such as get_utm_breakdown or get_breakdown_by_*, so an agent must infer the boundary from the tool name alone.

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?

There is no statement of when to reach for this tool versus the many sibling breakdown tools, and no exclusions or prerequisites. The source_type explanations read as parameter documentation rather than selection guidance. An agent gets no help deciding between get_top_sources, get_utm_breakdown, and get_breakdown_by_* for a given question.

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