Skip to main content
Glama
izharikov

Sitecore Send

send_smtp_email

Send emails via SMTP protocol to deliver messages with specified recipients, subjects, and HTML content.

Instructions

Send an email using SMTP

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesEmail address to send the email to
subjectYesSubject of the email
bodyYesHTML body of the email

Implementation Reference

  • The execute handler for the send_smtp_email tool, which sends the email using the SMTP client and returns success or failure message.
    execute: async ({ to, subject, body }) => {
      const res = await client.sendMail({
        from: config.from,
        to,
        subject,
        html: body,
      });
      return {
        content: [{ type: "text", text: res.accepted.length > 0 ? "Email sent successfully." : "Email sending failed." }]
      }
    }
  • Zod schema defining the input parameters for the send_smtp_email tool: to, subject, body.
    parameters: z.object({
      to: z.string().email().describe("Email address to send the email to"),
      subject: z.string().describe("Subject of the email"),
      body: z.string().describe("HTML body of the email"),
    }),
  • Registration of the send_smtp_email tool via server.addTool, including name, description, schema, annotations, and inline handler.
    server.addTool({
      name: "send_smtp_email",
      description: "Send an email using SMTP",
      parameters: z.object({
        to: z.string().email().describe("Email address to send the email to"),
        subject: z.string().describe("Subject of the email"),
        body: z.string().describe("HTML body of the email"),
      }),
      annotations: {
        title: "Send SMTP Email",
        openWorldHint: true,
      },
      execute: async ({ to, subject, body }) => {
        const res = await client.sendMail({
          from: config.from,
          to,
          subject,
          html: body,
        });
        return {
          content: [{ type: "text", text: res.accepted.length > 0 ? "Email sent successfully." : "Email sending failed." }]
        }
      }
    });
  • Helper function to create the Nodemailer SMTP transport client used by the tool handler.
    export const createClient = (smtpConfig: SmtpConfig) => nodemailer.createTransport({
      host: smtpConfig.host,
      port: smtpConfig.port,
      secure: smtpConfig.secure,
      auth: {
        user: smtpConfig.auth.user,
        pass: smtpConfig.auth.pass
      }
    });
  • src/tools/index.ts:7-7 (registration)
    Calls addSmptTools to register SMTP tools, invoked from the main tools aggregator.
    addSmptTools(server, config.smtp);
Behavior2/5

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

Annotations include 'openWorldHint: true', indicating potential for dynamic behavior, but the description adds no behavioral context beyond the basic action. It doesn't disclose SMTP-specific traits like authentication needs, rate limits, error handling, or what 'openWorldHint' implies in practice, leaving significant gaps for a mutation tool with minimal annotation coverage.

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, efficient sentence with zero wasted words. It's front-loaded with the core action and protocol, making it highly concise and well-structured for quick understanding.

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?

Given this is a mutation tool (sending email) with only 'openWorldHint' as annotation and no output schema, the description is inadequate. It lacks critical context like success/error responses, side effects (e.g., email delivery status), or how 'openWorldHint' affects usage, leaving the agent under-informed for reliable tool invocation.

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 (e.g., 'to' as email address, 'body' as HTML). The description adds no additional semantic meaning beyond the schema, so it meets the baseline of 3 without compensating or detracting.

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 'Send an email using SMTP' clearly states the action (send) and resource (email), specifying the protocol (SMTP) which distinguishes it from other email-related tools like 'send_transactional_email'. However, it doesn't explicitly differentiate from all siblings beyond the protocol mention.

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 like 'send_transactional_email' or other email-related siblings. There's no mention of use cases, prerequisites, or exclusions, leaving the agent without contextual direction.

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