Skip to main content
Glama

rank_posts

Read-only

Rank Substack posts by a chosen dashboard email metric such as views, opens, open rate, clicks, signups, or estimated value in ascending or descending order to compare performance.

Instructions

Rank posts by one metric from Substack's dashboard email statistics: views, opened, sent, open_rate, click_through_rate, signups, subscribes, estimated_value or post_date, descending or ascending. Returns 10 rows by default, at most 20 (Substack's page limit), with total and next_offset for continuation. One read; nothing is changed. Values are passed through as Substack reports them: this server does not recompute, fill in or estimate metrics, and Substack does not document rate denominators. Each row marks the ranked value as reported, null or absent; null and absent are not zero, and null rates can appear among numeric rows. For one post's stats by ID, use get_post_analytics.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "rank_posts"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
metricNoviews
offsetNo
directionNodesc

Output Schema

NameRequiredDescriptionDefault
rowsYes
limitYes
totalYes
metricYes
offsetYes
sourceYes
has_moreYes
orderingYes
returnedYes
directionYes
semanticsYes
next_offsetYes
publicationYes
unreported_in_pageYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed47 schema fields changedv1.4.0
    • changedOutput schema / properties / next_offset / anyOf
      Previous value: -[
      -  {
      -    "$ref": "#/properties/offset"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maximum": 9007199254740991,
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / returned / $ref
      Removed value: -"#/properties/offset"
    • addedOutput schema / properties / returned / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / returned / minimum
      Added value: +0
    • addedOutput schema / properties / returned / type
      Added value: +"integer"
    • removedOutput schema / properties / rows / items / properties / metrics / properties / click_through_rate / $ref
      Removed value: -"#/properties/rows/items/properties/metrics/properties/views"
    • addedOutput schema / properties / rows / items / properties / metrics / properties / click_through_rate / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / rows / items / properties / metrics / properties / clicked / $ref
      Removed value: -"#/properties/rows/items/properties/metrics/properties/views"
    • addedOutput schema / properties / rows / items / properties / metrics / properties / clicked / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / rows / items / properties / metrics / properties / comments / $ref
      Removed value: -"#/properties/rows/items/properties/metrics/properties/views"
    • addedOutput schema / properties / rows / items / properties / metrics / properties / comments / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / rows / items / properties / metrics / properties / delivered / $ref
      Removed value: -"#/properties/rows/items/properties/metrics/properties/views"
    • addedOutput schema / properties / rows / items / properties / metrics / properties / delivered / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / rows / items / properties / metrics / properties / estimated_value / $ref
      Removed value: -"#/properties/rows/items/properties/metrics/properties/views"
    • addedOutput schema / properties / rows / items / properties / metrics / properties / estimated_value / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / rows / items / properties / metrics / properties / likes / $ref
      Removed value: -"#/properties/rows/items/properties/metrics/properties/views"
    • addedOutput schema / properties / rows / items / properties / metrics / properties / likes / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / rows / items / properties / metrics / properties / open_rate / $ref
      Removed value: -"#/properties/rows/items/properties/metrics/properties/views"
    • addedOutput schema / properties / rows / items / properties / metrics / properties / open_rate / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / rows / items / properties / metrics / properties / opened / $ref
      Removed value: -"#/properties/rows/items/properties/metrics/properties/views"
    • addedOutput schema / properties / rows / items / properties / metrics / properties / opened / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / rows / items / properties / metrics / properties / restacks / $ref
      Removed value: -"#/properties/rows/items/properties/metrics/properties/views"
    • addedOutput schema / properties / rows / items / properties / metrics / properties / restacks / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / rows / items / properties / metrics / properties / sent / $ref
      Removed value: -"#/properties/rows/items/properties/metrics/properties/views"
    • addedOutput schema / properties / rows / items / properties / metrics / properties / sent / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / rows / items / properties / metrics / properties / signups / $ref
      Removed value: -"#/properties/rows/items/properties/metrics/properties/views"
    • addedOutput schema / properties / rows / items / properties / metrics / properties / signups / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / rows / items / properties / metrics / properties / subscribes / $ref
      Removed value: -"#/properties/rows/items/properties/metrics/properties/views"
    • addedOutput schema / properties / rows / items / properties / metrics / properties / subscribes / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / rows / items / properties / metrics / properties / unsubscribes / $ref
      Removed value: -"#/properties/rows/items/properties/metrics/properties/views"
    • addedOutput schema / properties / rows / items / properties / metrics / properties / unsubscribes / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / rows / items / properties / metrics / properties / views / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / rows / items / properties / metrics / properties / views / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / rows / items / properties / post_id / $ref
      Removed value: -"#/properties/rows/items/properties/rank"
    • addedOutput schema / properties / rows / items / properties / post_id / exclusiveMinimum
      Added value: +0
    • addedOutput schema / properties / rows / items / properties / post_id / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / rows / items / properties / post_id / type
      Added value: +"integer"
    • removedOutput schema / properties / rows / items / properties / value / anyOf
      Removed value: -[
      -  {
      -    "anyOf": [
      -      {
      -        "type": "number"
      -      },
      -      {
      -        "type": "string"
      -      }
      -    ]
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / rows / items / properties / value / type
      Added value: +[
      +  "number",
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / total / $ref
      Removed value: -"#/properties/offset"
    • addedOutput schema / properties / total / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / total / minimum
      Added value: +0
    • addedOutput schema / properties / total / type
      Added value: +"integer"
    • removedOutput schema / properties / unreported_in_page / $ref
      Removed value: -"#/properties/offset"
    • addedOutput schema / properties / unreported_in_page / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / unreported_in_page / minimum
      Added value: +0
    • addedOutput schema / properties / unreported_in_page / type
      Added value: +"integer"
  2. Addedv1.2.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true; the description adds real substance beyond that: default 10 rows, hard cap of 20 tied to Substack's page limit, total plus next_offset for continuation. It further discloses pass-through semantics (no recomputation or estimation), undocumented rate denominators, and that null/absent are distinct from zero — all behaviors an agent cannot infer from annotations or schema.

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-loaded with the core action and metric list, then result shape, then caveats, then the alternative — a sensible order. Some phrasing is dense and 'One read; nothing is changed' largely restates readOnlyHint=true, a minor redundancy.

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?

An output schema exists, so return values need no prose, and the description instead covers the things schema cannot: pagination continuation, the 20-row cap, and null/absent versus zero in the data. For a four-parameter ranked-read tool this is complete enough to call correctly on the first try.

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 description coverage is 0%, so the description must carry the load: it explains limit via the 10-default/20-max statement, and offset via 'next_offset for continuation'. Metrics and direction are only echoed from the enums rather than expanded (e.g. what open_rate means), leaving a modest gap.

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 (rank) and resource (posts) and enumerates all nine metrics and both directions, so the agent knows exactly what the ordering axis is. It also names the sibling get_post_analytics and the condition that selects it, distinguishing this tool from a single-post lookup.

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?

Explicitly routes the agent to get_post_analytics when the goal is one post's stats by ID, which is a concrete when-to-use rule. It does not address other plausible alternatives (e.g. list_published_posts for unranked enumeration), so guidance is clear but not exhaustive.

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