Skip to main content
Glama
thenavidm
by thenavidm

Get aggregate stats

get_post_aggregate_stats
Read-onlyIdempotent

Retrieve aggregate post statistics for a Beehiiv publication, filtered by status, audience, platform, authors, content tags, or feed visibility.

Instructions

Get aggregate stats. Reads account data. OAuth integrations require posts:read.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoOptionally filter the results by the status of the post. `draft` - not been scheduled. `confirmed` - The post will be active after the `scheduled_at`. `archived` - The post is no longer active. `all` - Does not restrict results by status.all
accountNoNamed private account from BEEHIIV_ACCOUNTS. Defaults to BEEHIIV_DEFAULT_ACCOUNT or the first configured account.
authorsNoOptionally filter posts by their authors. Adding an author name will return any post with that author associated to it (case-insensitive). Example: Filtering for `authors: ["John Doe","Jane Smith"]` will return results of posts that have *either* John Doe or Jane Smith as authors.
audienceNoOptionally filter the results by audienceall
platformNoOptionally filter the results by platform. `web` - Posts only published to web. `email` - Posts only published to email. `both` - Posts published to email and web. `all` - Does not restrict results by platform.all
content_tagsNoOptionally filter posts by content_tags. Adding a content tag will return any post with that content tag associated to it. Example: Filtering for `content_tags: ["sales","closing"]` will return results of posts that have *either* sales or closing content_tags.
publication_idYesThe prefixed ID of the publication object
hidden_from_feedNoOptionally filter the results by the `hidden_from_feed` attribute of the post. `all` - Does not restrict results by `hidden_from_feed`. `true` - Only return posts hidden from the feed. `false` - Only return posts that are visible on the feed.all

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint, and destructiveHint=false, so the safety profile is covered. The description adds genuinely new behavioral context by disclosing the required OAuth scope ('posts:read'), which an agent needs in order to know whether the call will be authorized. It does not, however, describe what the aggregate stats contain or their granularity.

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 action, with no wasted text. 'Reads account data' is somewhat filler, keeping it from a 5, but the structure is efficient.

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 8-parameter analytics tool with no output schema, the description should explain what the aggregate statistics actually are (counts? opens? clicks?) and at what granularity. It leaves the entire return shape undefined, which is a significant gap when there is no output schema to fall back on.

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 eight filter parameters (status, authors, audience, platform, content_tags, hidden_from_feed, etc.) are fully documented in the schema, so the baseline of 3 applies. The description adds no syntax or semantics beyond what the schema already provides.

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

Purpose3/5

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

The description 'Get aggregate stats' essentially restates the title and name, without specifying which metrics are aggregated, over what dimension (posts? engagement?), or what makes this different from siblings like list_posts or get_post. The verb+resource are present, so it is not pure tautology, but the purpose remains vague.

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 use this tool versus alternatives such as list_posts, get_post, or list_engagements. The only context given is that it reads account data, which does not help an agent route between the many sibling read tools.

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

Deploy Server

Other Tools