Skip to main content
Glama
izharikov

Sitecore Send

get_single_list

Retrieve detailed information about a specific mailing list, including total subscriber count and current status, from the Sitecore Send platform.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
listIdYesId of the mailing list

Implementation Reference

  • src/tools/api.ts:30-51 (registration)
    Registration of the 'get_single_list' tool using server.addTool, defining name, description, schema, annotations, and 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") }
          ]
        }
      }
    });
  • Handler function that uses SendClient to fetch mailing list details by ID and returns formatted key-value pairs.
    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") }
        ]
      }
    }
  • Input schema using Zod, validating listId as a UUID string.
    parameters: z.object({
      listId: z.string().uuid().describe("Id of the mailing list")
    }),

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