Skip to main content
Glama
deyikong

SendGrid MCP Server

by deyikong

list_automations

Retrieve all marketing automations from SendGrid to manage email workflows, campaigns, and automated sequences.

Instructions

List all marketing automations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
offsetNoPagination offset
limitNoNumber of results to return

Implementation Reference

  • The handler function that executes the tool logic by querying the SendGrid API for marketing automations with pagination parameters.
    handler: async ({ offset, limit }: { offset: number; limit: number }): Promise<ToolResult> => { const result = await makeRequest(`https://api.sendgrid.com/v3/marketing/automations?offset=${offset}&limit=${limit}`); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; },
  • Tool configuration including title, description, and input schema for pagination (offset and limit).
    config: { title: "List Marketing Automations", description: "List all marketing automations", inputSchema: { offset: PaginationSchema.offset, limit: PaginationSchema.limit, }, },
  • Imports automationTools and spreads it into the allTools export, aggregating tools for registration.
    import { automationTools } from "./automations.js"; import { campaignTools } from "./campaigns.js"; import { contactTools } from "./contacts.js"; import { mailTools } from "./mail.js"; import { miscTools } from "./misc.js"; import { statsTools } from "./stats.js"; import { templateTools } from "./templates.js"; export const allTools = { ...automationTools,
  • src/index.ts:20-22 (registration)
    Registers all tools (including list_automations) with the MCP server using server.registerTool.
    // Register all tools for (const [name, tool] of Object.entries(allTools)) { server.registerTool(name, tool.config as any, tool.handler as any);

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