Skip to main content
Glama

get_single_list

Retrieve detailed information about a specific mailing list, including total count and status, using the list ID in the Sitecore Send MCP Server.

Instructions

Get a single mailing list details: total count, status, etc

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
listIdYesId of the mailing list

Implementation Reference

  • The execute handler function that retrieves a single mailing list by ID using SendClient.lists.getById, extracts specific keys, and returns formatted text output.
    execute: async ({ listId }) => { const listResponse = await client.lists.getById(listId); const list = listResponse; type Keys = keyof typeof list; const keys = ['Name', 'ActiveMemberCount', 'BouncedMemberCount', 'RemovedMemberCount', 'UnsubscribedMemberCount', 'Preferences', 'StatusValue'] as Keys[]; return { content: [ { type: "text", text: keys.map(x => `- ${x}: '${list[x]}'`).join("\n") } ] } }
  • Zod input schema defining the listId parameter as a UUID string.
    parameters: z.object({ listId: z.string().uuid().describe("Id of the mailing list") }),
  • src/tools/api.ts:30-51 (registration)
    The server.addTool call registering the 'get_single_list' tool with name, description, parameters schema, annotations, and execute handler.
    server.addTool({ name: "get_single_list", description: "Get a single mailing list details: total count, status, etc", parameters: z.object({ listId: z.string().uuid().describe("Id of the mailing list") }), annotations: { title: "Get a single mailing list", openWorldHint: true, }, execute: async ({ listId }) => { const listResponse = await client.lists.getById(listId); const list = listResponse; type Keys = keyof typeof list; const keys = ['Name', 'ActiveMemberCount', 'BouncedMemberCount', 'RemovedMemberCount', 'UnsubscribedMemberCount', 'Preferences', 'StatusValue'] as Keys[]; return { content: [ { type: "text", text: keys.map(x => `- ${x}: '${list[x]}'`).join("\n") } ] } } });

Other Tools

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

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