Skip to main content
Glama
ousepachn

Beehiiv Analytics MCP Server

by ousepachn

get_publication_details

Retrieve detailed analytics and statistics for a specific Beehiiv newsletter publication using its ID.

Instructions

Get detailed information about a specific publication

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
publication_idYesThe ID of the publication

Implementation Reference

  • MCP call_tool handler that processes arguments, calls the Beehiiv API client, and returns the publication details as JSON text content.
    elif name == "get_publication_details":
        publication_id = arguments["publication_id"]
        details = client.get_publication_details(publication_id)
        return CallToolResult(
            content=[TextContent(type="text", text=json.dumps(details, indent=2))]
        )
  • Input schema specifying the required 'publication_id' string parameter for the tool.
    inputSchema={
        "type": "object",
        "properties": {
            "publication_id": {
                "type": "string",
                "description": "The publication ID (e.g., pub_00000000-0000-0000-0000-000000000000)",
            }
        },
        "required": ["publication_id"],
    },
  • Tool registration in the list_tools() decorator, including name, description, and schema.
    Tool(
        name="get_publication_details",
        description="Get detailed information about a specific publication",
        inputSchema={
            "type": "object",
            "properties": {
                "publication_id": {
                    "type": "string",
                    "description": "The publication ID (e.g., pub_00000000-0000-0000-0000-000000000000)",
                }
            },
            "required": ["publication_id"],
        },
    ),
  • BeehiivAPI helper method that performs the actual API request to fetch publication details.
    def get_publication_details(self, publication_id: str) -> Dict[str, Any]:
        """Get detailed information about a specific publication."""
        data = self._make_request("GET", f"/publications/{publication_id}")
        return data.get("data", {})
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it 'gets' information, implying a read-only operation, but doesn't clarify aspects like authentication needs, rate limits, error handling, or what 'detailed information' entails beyond the single parameter. This leaves significant gaps for a tool with no structured safety hints.

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 with zero waste. It front-loads the core purpose ('Get detailed information') and specifies the resource ('about a specific publication'), making it easy to parse and appropriately sized for its simplicity.

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 lack of annotations and output schema, the description is incomplete. It doesn't explain what 'detailed information' includes in the return values, nor does it address behavioral aspects like permissions or errors. For a tool with no structured context, this leaves the agent under-informed about how to use it effectively.

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 schema description coverage is 100%, with the parameter 'publication_id' fully documented in the schema. The description adds no additional meaning beyond implying it fetches details for a 'specific' publication, which is already clear from the schema. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and resource 'detailed information about a specific publication,' making the purpose evident. However, it doesn't explicitly differentiate from sibling tools like 'get_publications' (which likely lists multiple publications) or 'get_post_details' (which might handle different resource types), so it falls short of a perfect score.

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. It doesn't mention siblings like 'get_publications' for listing publications or 'get_post_details' for other resource types, nor does it specify prerequisites or exclusions, leaving the agent to infer usage context.

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