Skip to main content
Glama
Garoth

SendGrid MCP Server

by Garoth

list_contact_lists

Retrieve all contact lists from your SendGrid account to manage email marketing campaigns and audience segmentation.

Instructions

List all contact lists in your SendGrid account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function that executes the API call to retrieve all contact lists from SendGrid's /v3/marketing/lists endpoint.
    async listContactLists(): Promise<SendGridList[]> { const [response] = await this.client.request({ method: 'GET', url: '/v3/marketing/lists' }); return (response.body as { result: SendGridList[] }).result; }
  • Tool-specific handler in the main tool dispatcher that invokes the service method and formats the response as a JSON string.
    case 'list_contact_lists': const lists = await service.listContactLists(); return { content: [{ type: 'text', text: JSON.stringify(lists.map(l => ({ id: l.id, name: l.name, contact_count: l.contact_count })), null, 2) }] };
  • Tool registration including name, description, and input schema (no inputs required).
    { name: 'list_contact_lists', description: 'List all contact lists in your SendGrid account', inputSchema: { type: 'object', properties: {}, required: [] } },
  • Input schema definition for the tool (empty object, no parameters required).
    inputSchema: { type: 'object', properties: {}, required: [] } },

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