Skip to main content
Glama

get_subscribers

Retrieve all subscribers associated with a specific mailing list in Sitecore Send by providing the list ID.

Instructions

Get subscribers of a mailing list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
listIdYesId of the mailing list

Implementation Reference

  • The main handler function that implements the logic for retrieving and formatting subscribers from a mailing list using the SendClient library.
    execute: async ({ listId }) => { const response = await client.subscribers.fromList(listId); const result = response.Subscribers.map(x => `- '${x.Email}', Name: '${x.Name}', Tags: [${x.Tags.join(", ")}]`); return { content: [ { type: "text", text: result.join("\n") } ] } },
  • Zod schema for the tool's input parameters, defining listId as a required UUID string.
    parameters: z.object({ listId: z.string().uuid().describe("Id of the mailing list") }),
  • src/tools/api.ts:53-72 (registration)
    The server.addTool call that registers the get_subscribers tool with name, description, schema, annotations, and handler.
    server.addTool({ name: "get_subscribers", description: "Get subscribers of a mailing list", parameters: z.object({ listId: z.string().uuid().describe("Id of the mailing list") }), annotations: { title: "Get subscribers of a mailing list", openWorldHint: true, }, execute: async ({ listId }) => { const response = await client.subscribers.fromList(listId); const result = response.Subscribers.map(x => `- '${x.Email}', Name: '${x.Name}', Tags: [${x.Tags.join(", ")}]`); return { content: [ { type: "text", text: result.join("\n") } ] } }, });

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/izharikov/send-mcp'

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