Skip to main content
Glama

get_post_analytics

Read-only

Retrieve performance stats for a published Substack post by ID: views, emails sent/delivered/opened, signups, subscribes, estimated value, comments, and reactions. Searches recent posts when no direct endpoint exists.

Instructions

Get performance stats (views, emails sent/delivered/opened, signups, subscribes, estimated value, comments, reactions) for a published post by ID. Substack has no per-post stats endpoint, so this searches your 500 most recent published posts for the ID; returns a not-found note if it isn't among them, saying whether the search reached the end of the feed, reached its bound, or found the feed's pages incomplete or inconsistent. Pages are separate reads, so concurrent publishing or deletion can hide a post. stats_available is false when a found post has no statistics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
post_idYesThe published post ID to get stats for

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNo
noteNo
sentNo
foundYes
titleNo
viewsNo
openedNo
post_idNo
scannedNo
signupsNo
deliveredNo
post_dateNo
subscribesNo
feed_cappedNo
comment_countNo
search_resultNo
reaction_countNo
estimated_valueNo
stats_availableNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.2.0
    • addedOutput schema / properties / feed_capped
      Added value: +{
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / scanned
      Added value: +{
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedOutput schema / properties / search_result
      Added value: +{
      +  "enum": [
      +    "archive_exhausted",
      +    "scan_bound_reached",
      +    "feed_incomplete"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / stats_available
      Added value: +{
      +  "type": "boolean"
      +}
  2. Changed4 schema fields changed
    • addedInput schema / properties / post_id / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / post_id / maximum
      Added value: +9007199254740991
    • changedInput schema / properties / post_id / type
      Previous value: -"number"New value: +"integer"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "comment_count": {
      +      "$ref": "#/properties/views"
      +    },
      +    "delivered": {
      +      "$ref": "#/properties/views"
      +    },
      +    "estimated_value": {
      +      "anyOf": [
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "found": {
      +      "type": "boolean"
      +    },
      +    "id": {
      +      "$ref": "#/properties/post_id"
      +    },
      +    "note": {
      +      "type": "string"
      +    },
      +    "opened": {
      +      "$ref": "#/properties/views"
      +    },
      +    "post_date": {
      +      "$ref": "#/properties/title"
      +    },
      +    "post_id": {
      +      "exclusiveMinimum": 0,
      +      "maximum": 9007199254740991,
      +      "type": "integer"
      +    },
      +    "reaction_count": {
      +      "$ref": "#/properties/views"
      +    },
      +    "sent": {
      +      "$ref": "#/properties/views"
      +    },
      +    "signups": {
      +      "$ref": "#/properties/views"
      +    },
      +    "subscribes": {
      +      "$ref": "#/properties/views"
      +    },
      +    "title": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "views": {
      +      "anyOf": [
      +        {
      +          "maximum": 9007199254740991,
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    }
      +  },
      +  "required": [
      +    "found"
      +  ],
      +  "type": "object"
      +}
  3. Addedv0.5.0

TDQS

A4.5/5.0
Behavior5/5

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

The description goes far beyond the readOnlyHint annotation by disclosing the lack of a native per-post stats endpoint, the 500-post search behavior, the not-found note variants, and the concurrency caveat ('concurrent publishing or deletion can hide a post'). It also explains the stats_available false case, giving the agent a realistic model of failure modes and edge cases.

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?

The description is front-loaded with the core action and resource, then adds only high-value behavioral caveats and edge cases. Every sentence earns its place: the metrics list, the search workaround, the concurrency warning, and the stats_available clarification. It is dense but not bloated.

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

Completeness5/5

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

Given the tool's complexity and the presence of an output schema, the description is remarkably complete. It covers the operation, the underlying limitation, the search bound, failure conditions, concurrency risks, and the meaning of stats_available. An agent has enough information to invoke it correctly and interpret unusual outcomes.

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?

The input schema already documents post_id with a clear description and 100% coverage. The description adds no new parameter-specific meaning beyond referring to 'by ID', so the baseline of 3 applies. There is no gap for the description to fill.

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?

The description opens with a specific verb and resource: 'Get performance stats (views, emails sent/delivered/opened, signups, subscribes, estimated value, comments, reactions) for a published post by ID.' This unambiguously states what the tool does and lists the metrics. It also clearly distinguishes itself from siblings like get_post and get_post_comments by focusing on analytics rather than content or comments.

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?

The description clearly establishes when to use the tool: when you need performance stats for a published post by ID. It does not explicitly name alternatives or state when not to use it, but the context is unambiguous. The mention of 'published post' helps differentiate it from draft-related siblings.

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