Skip to main content
Glama

get_post_analytics

Read-only

Retrieve performance statistics for a published Substack post by ID, including views, email delivery/opens, signups, subscriptions, comments, and reactions.

Instructions

Get performance stats (views, emails sent/delivered/opened, signups, subscribes, estimated value, comments, reactions) for a published post by ID. First reads the exact post detail (one authenticated read) and requires a published post with a post date. A draft, 403/404, malformed detail, ID mismatch, or other detail error except 401/429 triggers a scan of at most the 500 most recent published posts with up to 10 more reads. No writes. A feed-scan miss is bounded, not proof the post never existed; separate pages can shift. stats_available is false when a found post has no statistics. Per-post rates are upstream 0–1 fractions and are not added to this legacy projection.

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": {
      "post_id": "<post_id>"
    },
    "name": "get_post_analytics"
  }
}

Input Schema

NameRequiredDescriptionDefault
post_idYesThe published post ID to get stats for

Output Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed23 schema fields changedv1.4.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / comment_count / $ref
      Removed value: -"#/properties/views"
    • addedOutput schema / properties / comment_count / anyOf
      Added value: +[
      +  {
      +    "maximum": 9007199254740991,
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / delivered / $ref
      Removed value: -"#/properties/views"
    • addedOutput schema / properties / delivered / anyOf
      Added value: +[
      +  {
      +    "maximum": 9007199254740991,
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / estimated_value / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / estimated_value / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / id / $ref
      Removed value: -"#/properties/post_id"
    • addedOutput schema / properties / id / exclusiveMinimum
      Added value: +0
    • addedOutput schema / properties / id / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / id / type
      Added value: +"integer"
    • removedOutput schema / properties / opened / $ref
      Removed value: -"#/properties/views"
    • addedOutput schema / properties / opened / anyOf
      Added value: +[
      +  {
      +    "maximum": 9007199254740991,
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / post_date / $ref
      Removed value: -"#/properties/title"
    • addedOutput schema / properties / post_date / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / reaction_count / $ref
      Removed value: -"#/properties/views"
    • addedOutput schema / properties / reaction_count / anyOf
      Added value: +[
      +  {
      +    "maximum": 9007199254740991,
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / sent / $ref
      Removed value: -"#/properties/views"
    • addedOutput schema / properties / sent / anyOf
      Added value: +[
      +  {
      +    "maximum": 9007199254740991,
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / signups / $ref
      Removed value: -"#/properties/views"
    • addedOutput schema / properties / signups / anyOf
      Added value: +[
      +  {
      +    "maximum": 9007199254740991,
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / subscribes / $ref
      Removed value: -"#/properties/views"
    • addedOutput schema / properties / subscribes / anyOf
      Added value: +[
      +  {
      +    "maximum": 9007199254740991,
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Changed2 schema fields changedv1.3.0
    • addedOutput schema / properties / detail_fallback_reason
      Added value: +{
      +  "enum": [
      +    "not_found",
      +    "malformed",
      +    "id_mismatch",
      +    "forbidden",
      +    "not_published",
      +    "upstream_error"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / source
      Added value: +{
      +  "enum": [
      +    "post_detail",
      +    "published_feed_scan"
      +  ],
      +  "type": "string"
      +}
  3. 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"
      +}
  4. 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"
      +}
  5. Addedv0.5.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond readOnlyHint by disclosing the two-phase read, the exact trigger conditions for the fallback feed scan, its bound (500 posts, up to 10 extra reads), the fact that 401/429 do not trigger the scan, and that a scan miss is not proof of non-existence. It also flags shifting pagination, the stats_available=false case, and the 0–1 rate scaling — none of which the annotations convey.

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?

Front-loads what the tool returns, then the read/fallback mechanics, then caveats — a sensible order with little filler. The closing clause about per-post rates and the 'legacy projection' is compressed to the point of being cryptic for an agent deciding how to interpret the numbers.

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?

For a single-parameter read with an output schema, the description supplies the operational edge cases an agent needs: failure triggers for the expensive fallback path, the meaning of stats_available, and units for rate fields. Return-value shapes are correctly left to the output schema.

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 schema already documents post_id; the description adds meaningful constraint by requiring a published post with a post date rather than any post ID. Nothing further about the single integer parameter needs explaining.

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 ('Get performance stats ... for a published post by ID') and enumerates the metric families returned (views, emails, signups, subscribes, value, comments, reactions). This distinguishes it from list_published_posts, get_post, and rank_posts without ambiguity.

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?

Clearly states the precondition — the post must be published and have a post date — and implicitly excludes drafts. It does not name the alternative tool to use for a draft or for cross-post ranking, so the routing guidance is clear but not spelled out.

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