Skip to main content
Glama
ousepachn

Beehiiv Analytics MCP Server

by ousepachn

get_posts

Retrieve newsletter posts from a Beehiiv publication to analyze content performance and track publication activity.

Instructions

Get posts for a publication

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
publication_idYesThe ID of the publication
limitNoNumber of posts to return (default: 10)

Implementation Reference

  • server.js:90-92 (handler)
    Core implementation of get_posts tool: makes HTTP GET request to Beehiiv API to retrieve posts for a publication.
    async getPosts(publicationId, limit = 10) {
      return await makeRequest('GET', `${this.baseUrl}/publications/${publicationId}/posts?limit=${limit}`, this.headers);
    }
  • Handler dispatch in tools/call: executes get_posts by calling client.getPosts with parameters.
    case 'get_posts':
      result = await client.getPosts(args.publication_id, args.limit || 10);
      break;
  • Input schema for get_posts tool defining publication_id (required) and optional limit.
    inputSchema: {
      type: "object",
      properties: {
        publication_id: {
          type: "string",
          description: "The ID of the publication"
        },
        limit: {
          type: "number",
          description: "Number of posts to return (default: 10)",
          default: 10
        }
      },
      required: ["publication_id"]
    }
  • server.js:215-233 (registration)
    Registration of get_posts tool in tools/list response with name, description, and input schema.
    {
      name: "get_posts",
      description: "Get posts for a publication",
      inputSchema: {
        type: "object",
        properties: {
          publication_id: {
            type: "string",
            description: "The ID of the publication"
          },
          limit: {
            type: "number",
            description: "Number of posts to return (default: 10)",
            default: 10
          }
        },
        required: ["publication_id"]
      }
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'gets' posts, implying a read operation, but does not specify whether it lists all posts, filters them, requires authentication, has rate limits, or describes the return format. For a tool with zero annotation coverage, this is a significant gap in transparency.

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 a single, efficient sentence: 'Get posts for a publication'. It is front-loaded with the core action and resource, with zero wasted words. Every part of the sentence earns its place by conveying essential information without redundancy.

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?

Given the tool's complexity (a read operation with parameters), lack of annotations, and no output schema, the description is incomplete. It does not explain what 'posts' entail, how they are returned, or any behavioral traits like pagination or error handling. For a tool with these contextual gaps, the description should provide more completeness to aid the agent.

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 has 100% description coverage, clearly documenting both parameters: 'publication_id' and 'limit' with default. The description adds no additional meaning beyond the schema, such as explaining what constitutes a 'publication' or how posts are ordered. With high schema coverage, the baseline score of 3 is appropriate as the schema handles the heavy lifting.

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 posts for a publication' clearly states the action (get) and resource (posts), and specifies the scope (for a publication). However, it does not distinguish this tool from its sibling 'get_post_details', which might retrieve specific post information rather than a list. The purpose is clear but lacks sibling differentiation.

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?

The description provides no guidance on when to use this tool versus alternatives like 'get_post_details' or 'get_publications'. It implies usage for retrieving posts associated with a publication, but offers no explicit context, exclusions, or prerequisites. This leaves the agent to infer usage without clear direction.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ousepachn/beehiivanalyticsMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server