Skip to main content
Glama

Beehiiv Analytics MCP Server

by ousepachn

get_publication_details

Retrieve comprehensive analytics and statistics for a specific Beehiiv newsletter publication, including audience data and performance metrics.

Instructions

Get detailed information about a specific publication

Input Schema

NameRequiredDescriptionDefault
publication_idYesThe ID of the publication

Input Schema (JSON Schema)

{ "properties": { "publication_id": { "description": "The ID of the publication", "type": "string" } }, "required": [ "publication_id" ], "type": "object" }

Implementation Reference

  • Core handler function in BeehiivAPI class that fetches detailed publication information from the Beehiiv API using a GET request.
    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", {})
  • Input schema for the get_publication_details tool, defining the required publication_id parameter.
    inputSchema={ "type": "object", "properties": { "publication_id": { "type": "string", "description": "The publication ID (e.g., pub_00000000-0000-0000-0000-000000000000)", } }, "required": ["publication_id"], },
  • Registration of the get_publication_details tool in the list_tools() function, 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"], }, ),
  • MCP server dispatch handler in call_tool() that extracts publication_id and calls the BeehiivAPI.get_publication_details method.
    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))] )

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