Skip to main content
Glama

rank_posts

Read-only

Rank Substack posts by any email metric—views, open rate, signups, or more—in ascending or descending order. Returns paginated results with total count for continuation.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
metricNoviews
offsetNo
directionNodesc

Output Schema

TableJSON 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. Addedv1.2.0

TDQS

A5/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description adds critical behavior: it returns default/max rows, supports pagination via total and next_offset, passes values through unmodified, does not recompute metrics, and explains that null/absent are distinct from zero. These details prevent an agent from assuming the tool cleans or infers data.

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 information-dense and front-loaded with the core purposeable immediately actionable. Every sentence contributes substantive value—purpose, pagination, read safety, data fidelity, null semantics, and sibling routing. The only minor redundancy is "One read; nothing is changed," which is short and reinforces rather than bloats.

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 output schema exists for return valuesстоит, the description covers everything needed to call the tool correctly: parameter meanings, defaults, limits, pagination, behavioral caveats, and alternative tool routing. It is complete enough for agent invocation without further inference.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description carries the full burden. It enumerates every metric enum value, explains the limit default and maximum, conveys offset continuation semantics through next_offset, and clarifies sort direction. It also provides important caveats about rate denominators and null handling that the schema alone could not convey.

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: "Rank posts by one metric from Substack's dashboard email statistics." It enumerates the exact metrics and sort directions, making the tool's purpose unambiguous. The final sentence explicitly distinguishes it from get_post_analytics, which is the closely related sibling for single-post stats.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly states the intended use case—ranking multiple posts by a dashboard metric—and explicitly routes single-post stats to get_post_analytics. This gives the agent a direct decision rule for choosing between the two most similar tools.

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