Skip to main content
Glama
Garoth

SendGrid MCP Server

by Garoth

add_contact

Add email contacts to SendGrid marketing lists for email campaigns and audience management.

Instructions

Add a contact to your SendGrid marketing contacts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailYesContact email address
first_nameNoContact first name (optional)
last_nameNoContact last name (optional)
custom_fieldsNoCustom field values (optional)

Implementation Reference

  • Core handler function in SendGridService that adds a single contact by sending a PUT request to SendGrid's /v3/marketing/contacts endpoint.
    async addContact(contact: SendGridContact) {
      const [response] = await this.client.request({
        method: 'PUT',
        url: '/v3/marketing/contacts',
        body: {
          contacts: [contact]
        }
      });
      return response;
    }
  • Tool call handler case in handleToolCall that invokes the service.addContact method with tool arguments and returns a success response.
    case 'add_contact':
      await service.addContact(args as SendGridContact);
      return { content: [{ type: 'text', text: `Contact ${args.email} added successfully` }] };
  • Registration of the 'add_contact' tool in getToolDefinitions, including name, description, and input schema for MCP tool protocol.
    {
      name: 'add_contact',
      description: 'Add a contact to your SendGrid marketing contacts',
      inputSchema: {
        type: 'object',
        properties: {
          email: {
            type: 'string',
            description: 'Contact email address'
          },
          first_name: {
            type: 'string',
            description: 'Contact first name (optional)'
          },
          last_name: {
            type: 'string',
            description: 'Contact last name (optional)'
          },
          custom_fields: {
            type: 'object',
            description: 'Custom field values (optional)'
          }
        },
        required: ['email']
      }
    },
  • TypeScript interface defining the structure of a SendGridContact, used for type safety in the addContact handler and matching the tool inputSchema.
    export interface SendGridContact {
      id?: string;
      email: string;
      first_name?: string;
      last_name?: string;
      custom_fields?: Record<string, any>;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is an 'Add' operation (implying mutation) but doesn't mention permissions required, whether duplicates are handled, rate limits, or what happens on success/failure. For a mutation tool with zero annotation coverage, this is inadequate.

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 that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded with the essential information.

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 mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what happens after adding (e.g., returns contact ID, confirmation message), error conditions, or how it interacts with related tools like lists or custom fields mentioned in parameters.

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%, so the schema already documents all 4 parameters thoroughly. The description adds no additional parameter information beyond what's in the schema, meeting the baseline expectation when schema coverage is high.

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 ('Add') and resource ('contact to your SendGrid marketing contacts'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'add_contacts_to_list' or 'create_contact_list', which appear to have related functionality.

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 'add_contacts_to_list' or 'create_contact_list'. There's no mention of prerequisites, context, or exclusions, leaving the agent with minimal usage 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/Garoth/sendgrid-mcp'

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