Skip to main content
Glama
deyikong

SendGrid MCP Server

by deyikong

Create Sender

create_sender

Create a new sender identity with required contact and address details to authorize email sending.

Instructions

Create a new sender identity

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nicknameYesNickname for the sender
fromYes
reply_toYes
addressYesStreet address
cityYesCity
stateYesState
zipYesZIP code
countryYesCountry

Implementation Reference

  • The handler function that executes the create_sender tool logic. It checks read-only mode, then makes a POST request to SendGrid's marketing/senders API with the provided sender data, and returns a success message with the result.
    handler: async (senderData: any): Promise<ToolResult> => {
      const readOnlyCheck = checkReadOnlyMode();
      if (readOnlyCheck.blocked) {
        return { content: [{ type: "text", text: readOnlyCheck.message! }] };
      }
      
      const result = await makeRequest("https://api.sendgrid.com/v3/marketing/senders", {
        method: "POST",
        body: JSON.stringify(senderData),
      });
      return {
        content: [
          {
            type: "text",
            text: `Sender created successfully. ${JSON.stringify(result, null, 2)}\n\nIMPORTANT: Please verify the sender email address if the email's domain is not in the Sender Authentication settings.`,
          },
        ],
      };
    },
  • The Zod input schema for create_sender, defining required fields: nickname, from (email+name), reply_to (email+name), address, city, state, zip, and country.
    inputSchema: {
      nickname: z.string().describe("Nickname for the sender"),
      from: z.object({
        email: z.string().describe("From email address"),
        name: z.string().describe("From name"),
      }),
      reply_to: z.object({
        email: z.string().describe("Reply-to email address"),
        name: z.string().describe("Reply-to name"),
      }),
      address: z.string().describe("Street address"),
      city: z.string().describe("City"),
      state: z.string().describe("State"),
      zip: z.string().describe("ZIP code"),
      country: z.string().describe("Country"),
    },
  • The create_sender tool is registered as a property of the contactTools object (exported from contacts.ts at line 6). It is then re-exported via the spread operator in src/tools/index.ts (line 12).
    create_sender: {
      config: {
        title: "Create Sender",
        description: "Create a new sender identity",
        inputSchema: {
          nickname: z.string().describe("Nickname for the sender"),
          from: z.object({
            email: z.string().describe("From email address"),
            name: z.string().describe("From name"),
          }),
          reply_to: z.object({
            email: z.string().describe("Reply-to email address"),
            name: z.string().describe("Reply-to name"),
          }),
          address: z.string().describe("Street address"),
          city: z.string().describe("City"),
          state: z.string().describe("State"),
          zip: z.string().describe("ZIP code"),
          country: z.string().describe("Country"),
        },
      },
      handler: async (senderData: any): Promise<ToolResult> => {
        const readOnlyCheck = checkReadOnlyMode();
        if (readOnlyCheck.blocked) {
          return { content: [{ type: "text", text: readOnlyCheck.message! }] };
        }
        
        const result = await makeRequest("https://api.sendgrid.com/v3/marketing/senders", {
          method: "POST",
          body: JSON.stringify(senderData),
        });
        return {
          content: [
            {
              type: "text",
              text: `Sender created successfully. ${JSON.stringify(result, null, 2)}\n\nIMPORTANT: Please verify the sender email address if the email's domain is not in the Sender Authentication settings.`,
            },
          ],
        };
      },
    },
Behavior2/5

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

With no annotations, the description must disclose behavioral traits. It only implies a write operation without specifying side effects, required scopes, or return behavior.

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, uncluttered sentence of 5 words, efficient and front-loaded.

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 8 required parameters, nested objects, and no output schema, the description is too sparse to provide adequate context for correct 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 75%, so baseline is 3. The description adds no extra meaning beyond the schema, merely restating the action.

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

Purpose5/5

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

The description 'Create a new sender identity' clearly states the action and resource, distinguishing it from sibling tools like list_senders and delete_sender.

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, nor any prerequisites or exclusions.

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/deyikong/sendgrid-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server