Skip to main content
Glama
izharikov

Sitecore Send

unsubscribe_subscriber

Remove a subscriber's email from a mailing list to manage email preferences and comply with unsubscribe requests.

Instructions

Unsubscribe subscriber from a mailing list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
listIdYesId of the mailing list
emailYesEmail of the subscriber

Implementation Reference

  • Handler function that executes the unsubscribe operation by calling the SendClient's subscribers.unsubscribe method and returns success or error message.
    execute: async ({ listId, email }) => {
      try {
        await client.subscribers.unsubscribe(listId, email);
        return {
          content: [
            { type: "text", text: `Subscriber '${email}' successfully unsubscribed from mailing list '${listId}'` }
          ]
        }
      }
      catch (e) {
        return {
          content: [
            { type: "text", text: `Error: ${(e as ApiResponseError).sendResponse?.Error}` }
          ]
        }
      }
    }
  • Zod schema defining input parameters: listId (UUID) and email.
    parameters: z.object({
      listId: z.string().uuid().describe("Id of the mailing list"),
      email: z.string().email().describe("Email of the subscriber")
    }),
  • Registration of the 'unsubscribe_subscriber' tool using server.addTool, including name, description, schema, annotations, and handler.
    server.addTool({
      name: "unsubscribe_subscriber",
      description: "Unsubscribe subscriber from a mailing list",
      parameters: z.object({
        listId: z.string().uuid().describe("Id of the mailing list"),
        email: z.string().email().describe("Email of the subscriber")
      }),
      annotations: {
        title: "Unsubscribe subscriber from a mailing list",
        openWorldHint: true,
      },
      execute: async ({ listId, email }) => {
        try {
          await client.subscribers.unsubscribe(listId, email);
          return {
            content: [
              { type: "text", text: `Subscriber '${email}' successfully unsubscribed from mailing list '${listId}'` }
            ]
          }
        }
        catch (e) {
          return {
            content: [
              { type: "text", text: `Error: ${(e as ApiResponseError).sendResponse?.Error}` }
            ]
          }
        }
      }
    });
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations provide openWorldHint=true, but no safety hints. The description adds minimal behavioral context beyond the action name, implying a destructive operation but not specifying effects (e.g., permanent removal, opt-out status) or permissions required. It doesn't contradict annotations, but offers limited value beyond them.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, direct sentence with zero wasted words, efficiently conveying the core action. It's appropriately sized and front-loaded, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 2-parameter mutation tool with no output schema and minimal annotations, the description is adequate but lacks depth. It covers the basic action but misses details like return values, error conditions, or integration with sibling tools, leaving gaps in contextual understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear parameter descriptions in the schema. The tool description adds no additional parameter semantics beyond what's already documented in the input schema, meeting the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Unsubscribe') and target ('subscriber from a mailing list'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'add_subscriber' or 'get_subscriber_by_email' beyond the obvious action difference, missing explicit sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., subscriber must exist), exclusions, or compare with related tools like 'add_subscriber', leaving usage context entirely implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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