Skip to main content
Glama
izharikov

Sitecore Send

get_subscriber_by_email

Retrieve subscriber details from a Sitecore Send mailing list using their email address to access contact information and engagement data.

Instructions

Get subscriber by email

Input Schema

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

Implementation Reference

  • The execute function that implements the tool logic: fetches subscriber by email using the SendClient and returns formatted details or error.
    execute: async ({ listId, email }) => {
      try {
        const response = await client.subscribers.findByEmail(listId, email);
        type Keys = keyof typeof response;
        const keys = ['Email', 'Name', 'Tags'] as Keys[];
        return {
          content: [
            { type: "text", text: keys.map(x => `- ${x}: '${response[x]}'`).join("\n") }
          ]
        }
      }
      catch (e) {
        return {
          content: [
            { type: "text", text: `Error: ${(e as ApiResponseError).sendResponse?.Error}` }
          ]
        }
      }
    },
  • Zod schema for 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")
    }),
  • Tool registration via server.addTool, defining name, description, schema, annotations, and handler.
    server.addTool({
      name: "get_subscriber_by_email",
      description: "Get subscriber by email",
      parameters: z.object({
        listId: z.string().uuid().describe("Id of the mailing list"),
        email: z.string().email().describe("Email of the subscriber")
      }),
      annotations: {
        title: "Get subscriber by email",
        openWorldHint: true,
      },
      execute: async ({ listId, email }) => {
        try {
          const response = await client.subscribers.findByEmail(listId, email);
          type Keys = keyof typeof response;
          const keys = ['Email', 'Name', 'Tags'] as Keys[];
          return {
            content: [
              { type: "text", text: keys.map(x => `- ${x}: '${response[x]}'`).join("\n") }
            ]
          }
        }
        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, indicating this is a read operation that may return null for non-existent subscribers. The description adds no behavioral context beyond the basic 'get' action - no information about error conditions, authentication requirements, rate limits, or what happens when a subscriber isn't found. With annotations covering the open-world aspect, this meets minimum expectations but adds little value.

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 extremely concise at just three words. While this represents under-specification rather than ideal conciseness, from a pure structural perspective there's zero wasted language and it's front-loaded with the core action.

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

Completeness2/5

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

For a tool with two required parameters, no output schema, and only basic annotations, the description is inadequate. It doesn't explain what information is returned about the subscriber, how to interpret results, or provide any context about the subscriber data model. The description fails to compensate for the lack of output schema documentation.

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 both parameters (listId and email) fully documented in the schema. The description adds no parameter information beyond what's already in the structured schema. This meets the baseline expectation when schema coverage is complete.

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

Purpose2/5

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

The description 'Get subscriber by email' is essentially a tautology that restates the tool name without adding meaningful context. It specifies the verb 'get' and resource 'subscriber', but doesn't distinguish this from sibling tools like 'get_subscribers' or clarify what specific information is retrieved versus other subscriber-related tools.

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. With sibling tools like 'get_subscribers' (likely listing multiple subscribers) and 'get_single_list', there's no indication of when this specific email-based lookup is appropriate versus broader queries or other subscriber operations.

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