Skip to main content
Glama
deyikong

SendGrid MCP Server

by deyikong

list_single_sends

Retrieve and manage all single send email campaigns from SendGrid to review, analyze, or organize your marketing communications.

Instructions

List all single send campaigns

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
page_sizeNoNumber of results to return

Implementation Reference

  • The handler function that executes the list_single_sends tool logic by querying the SendGrid API for single send campaigns.
    handler: async ({ page_size }: { page_size: number }): Promise<ToolResult> => { const result = await makeRequest(`https://api.sendgrid.com/v3/marketing/singlesends/search?page_size=${page_size}`); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; },
  • The tool configuration including input schema using Zod for validation.
    config: { title: "List Single Send Campaigns", description: "List all single send campaigns", inputSchema: { page_size: z.number().optional().default(50).describe("Number of results to return"), }, },
  • src/index.ts:21-23 (registration)
    Registration of all tools, including 'list_single_sends', via loop over allTools object.
    for (const [name, tool] of Object.entries(allTools)) { server.registerTool(name, tool.config as any, tool.handler as any); }
  • Import and inclusion of campaignTools (containing list_single_sends) into the allTools export.
    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, ...campaignTools,

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