Skip to main content
Glama
getsentry

plausible-mcp

by getsentry

Compare Periods

compare_periods
Read-onlyIdempotent

Compare metrics between two date ranges side by side to analyze before/after deploy impact. Returns aggregate values per period plus absolute and percentage deltas.

Instructions

Compare metrics between two date ranges side by side. Ideal for before/after deploy analysis. Returns aggregate values for each period plus the delta (absolute and %).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
goalNoFilter by goal name (e.g. Signup, Purchase)
pageNoFilter by page path. Exact match by default, use * as trailing wildcard (e.g. /blog*)
metricsNoMetrics to return. Defaults vary by tool.
site_idYesPlausible site domain (e.g. example.com). Required.
period_aYesFirst date range, e.g. "2024-01-01,2024-01-07" or "7d"
period_bYesSecond date range, e.g. "2024-01-08,2024-01-14" or "7d"
property_filtersNoFilter results by built-in dimensions or custom event properties, e.g. [{ "property": "visit:channel", "operator": "is", "values": ["Organic Search"] }] or [{ "property": "plan", "values": ["pro"] }]. Entries are combined with AND.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
deltasYesPer-metric change from period_a to period_b (absolute and percent)
period_aYes
period_bYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv0.9.0
    • removedOutput schema / properties / deltas / additionalProperties / properties / absolute / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / deltas / additionalProperties / properties / absolute / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / deltas / additionalProperties / properties / percent / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / deltas / additionalProperties / properties / percent / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / period_a / properties / metrics / additionalProperties / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / period_a / properties / metrics / additionalProperties / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / period_b / properties / metrics / additionalProperties / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / period_b / properties / metrics / additionalProperties / type
      Added value: +[
      +  "number",
      +  "null"
      +]
  2. Changed1 schema field changedv0.7.2
    • addedInput schema / properties / property_filters / items / properties / values / items / maxLength
      Added value: +1024
  3. Changed5 schema fields changedv0.7.1
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / properties / property_filters
      Added value: +{
      +  "description": "Filter results by built-in dimensions or custom event properties, e.g. [{ \"property\": \"visit:channel\", \"operator\": \"is\", \"values\": [\"Organic Search\"] }] or [{ \"property\": \"plan\", \"values\": [\"pro\"] }]. Entries are combined with AND.",
      +  "items": {
      +    "properties": {
      +      "operator": {
      +        "default": "is",
      +        "description": "Match operator: is, is_not, contains, contains_not (default: is)",
      +        "enum": [
      +          "is",
      +          "is_not",
      +          "contains",
      +          "contains_not"
      +        ],
      +        "type": "string"
      +      },
      +      "property": {
      +        "description": "What to filter on: a built-in dimension (e.g. \"visit:channel\", \"visit:source\", \"event:page\") or a custom event property as its bare name (e.g. \"plan\" targets event:props:plan)",
      +        "maxLength": 312,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "values": {
      +        "description": "One or more values to match the property against",
      +        "items": {
      +          "type": "string"
      +        },
      +        "minItems": 1,
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "property",
      +      "values"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / properties / site_id / description
      Previous value: -"Plausible site domain (e.g. example.com). Uses PLAUSIBLE_DEFAULT_SITE_ID if omitted."New value: +"Plausible site domain (e.g. example.com). Required."
    • changedInput schema / required
      Previous value: -[
      -  "period_a",
      -  "period_b"
      -]New value: +[
      +  "site_id",
      +  "period_a",
      +  "period_b"
      +]
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  4. First observedv0.5.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint, so the safety profile is covered. The description adds that the result contains aggregate values for each period plus absolute and percentage deltas, which is genuinely useful behavioral context beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences with zero filler, front-loaded with the core comparison purpose and ending with the return shape. Every sentence earns its place.

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

Completeness4/5

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

With a full schema, an output schema, and annotations present, the description only needs to convey purpose, usage context and return nature, all of which it does. Nothing essential for correct invocation is missing.

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% and the description adds no parameter-level detail (no date-format syntax, no metric defaults, no filter semantics). Baseline 3 is appropriate when the schema fully documents the seven parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Compare metrics between two date ranges side by side.' The comparison semantics clearly distinguish it from siblings like get_timeseries and get_breakdown, which retrieve rather than diff two periods.

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?

'Ideal for before/after deploy analysis' gives a concrete usage context that tells the agent when this tool is the right pick. It stops short of naming exclusions or the sibling tools to prefer for single-period retrieval, so it is clear context without routing rules.

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