Skip to main content
Glama

get_lists

Retrieve all available mailing lists from Sitecore Send to manage email campaigns and audience segmentation.

Instructions

Get all available mailing lists

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for the 'get_lists' tool. It fetches all mailing lists using client.lists.getAll(), maps them to a formatted string list including name, status, and ID, and returns a text content response.
    execute: async () => { const lists = await client.lists.getAll(); const result = lists.MailingLists.map(x => `- '${x.Name}', status: '${x.StatusValue}', (id: '${x.ID}')`); return { content: [ { type: "text", text: result.join("\n") } ] } }
  • src/tools/api.ts:12-28 (registration)
    Registration of the 'get_lists' tool on the FastMCP server, specifying name, description, annotations, and the execute handler. No input parameters defined.
    server.addTool({ name: "get_lists", description: "Get all available mailing lists", annotations: { title: "Get all available mailing lists", openWorldHint: true, }, execute: async () => { const lists = await client.lists.getAll(); const result = lists.MailingLists.map(x => `- '${x.Name}', status: '${x.StatusValue}', (id: '${x.ID}')`); 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