list_automations
View and manage all marketing automations in your SendGrid account to monitor automated email workflows and campaigns.
Instructions
List all marketing automations
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of results to return | |
| offset | No | Pagination offset |
Implementation Reference
- src/tools/automations.ts:15-18 (handler)The handler function executes the tool logic by fetching marketing automations from SendGrid API using pagination parameters and returns the result as formatted JSON text.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) }] }; },
- src/tools/automations.ts:7-14 (schema)The tool configuration defining title, description, and input schema (offset and limit from PaginationSchema).config: { title: "List Marketing Automations", description: "List all marketing automations", inputSchema: { offset: PaginationSchema.offset, limit: PaginationSchema.limit, }, },
- src/tools/index.ts:9-17 (registration)Registers the automationTools (including list_automations) by spreading into the allTools export, aggregating all tools.export const allTools = { ...automationTools, ...campaignTools, ...contactTools, ...mailTools, ...miscTools, ...statsTools, ...templateTools, };
- src/index.ts:20-23 (registration)Final MCP server registration loop that registers every tool from allTools, including list_automations, with its config and handler.// Register all tools for (const [name, tool] of Object.entries(allTools)) { server.registerTool(name, tool.config as any, tool.handler as any); }