get_subscribers
Retrieve subscriber data for a Beehiiv publication to analyze audience composition and track growth metrics.
Instructions
Get subscribers for a publication
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| publication_id | Yes | The ID of the publication | |
| limit | No | Number of subscribers to return (default: 10) |
Implementation Reference
- server.js:98-100 (handler)Core implementation of the get_subscribers tool: makes HTTP GET request to Beehiiv API's subscribers endpoint.async getSubscribers(publicationId, limit = 10) { return await makeRequest('GET', `${this.baseUrl}/publications/${publicationId}/subscribers?limit=${limit}`, this.headers); }
- server.js:252-270 (registration)Registration of the get_subscribers tool in the tools/list response, including name, description, and input schema.{ name: "get_subscribers", description: "Get subscribers for a publication", inputSchema: { type: "object", properties: { publication_id: { type: "string", description: "The ID of the publication" }, limit: { type: "number", description: "Number of subscribers to return (default: 10)", default: 10 } }, required: ["publication_id"] } },
- server.js:255-269 (schema)Input schema definition for the get_subscribers tool.inputSchema: { type: "object", properties: { publication_id: { type: "string", description: "The ID of the publication" }, limit: { type: "number", description: "Number of subscribers to return (default: 10)", default: 10 } }, required: ["publication_id"] }
- server.js:381-383 (handler)MCP tools/call dispatch handler that executes get_subscribers by calling the BeehiivAPI method.case 'get_subscribers': result = await client.getSubscribers(args.publication_id, args.limit || 10); break;