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
| Name | Required | Description | Default |
|---|---|---|---|
| publication_id | Yes | The 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
- beehiiv_mcp_server.py:84-88 (handler)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", {})
- beehiiv_mcp_server.py:195-204 (schema)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"], },
- beehiiv_mcp_server.py:192-205 (registration)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"], }, ),
- beehiiv_mcp_server.py:393-398 (handler)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))] )