Guide

Analytics Abilities

@prc/analytics registers two WordPress Abilities for traffic analysis. Both are read-only and exposed as MCP public tools.

Ability index

AbilityPermissionSide effects
prc-analytics/analyze-postmanage_options (via with_site)Read-only Parse.ly or GA4 query
prc-analytics/analyze-topicmanage_options (via with_site)Read-only Parse.ly section query

Source: includes/class-ability.php

prc-analytics/analyze-post

Returns traffic for a post URL from Parse.ly (default) or GA4.

Reference

Input

Typed options, defaults, and constraints in one scannable reference.
5 fields
url url required
Post URL to analyze.
from string
Period start (provider-specific).
to string
Period end (provider-specific).
source enum
Traffic source.
site_id number
Optional multisite blog ID.

Output shape: { source, period, traffic_data }.

Date rules

SourceDefault / max
Parse.lyMost recent 90 days; max span 90 days
GA4Default trailing 30 days; max span 366 days (historical ranges allowed)

Common error codes

analytics_invalid_source, parsely_invalid_date, parsely_invalid_date_range, parsely_date_range_too_long, parsely_date_range_too_old, ga_invalid_date, ga_invalid_date_range, ga_date_range_too_long, plus GA provider codes such as ga_invalid_url and ga_service_account.

prc-analytics/analyze-topic

Top-performing posts for a Parse.ly section. Parse.ly only (no GA path).

Reference

Input

Typed options, defaults, and constraints in one scannable reference.
5 fields
topic string required
Parse.ly section / topic name.
from string
Period start.
to string
Period end.
limit number
Result limit (1–100).
site_id number
Optional multisite blog ID.

Was this helpful?