Get Automation Details
get_automationRetrieve detailed information about a specific automation, including all steps and settings.
Instructions
Get detailed information about a specific automation including all steps and settings
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| automation_id | Yes | The automation ID to retrieve |
Implementation Reference
- src/tools/automations.ts:30-33 (handler)The handler function for the 'get_automation' tool. It takes an automation_id string, makes a GET request to the SendGrid marketing automations API endpoint, and returns the result as formatted JSON.
handler: async ({ automation_id }: { automation_id: string }): Promise<ToolResult> => { const result = await makeRequest(`https://api.sendgrid.com/v3/marketing/automations/${automation_id}`); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; }, - src/tools/automations.ts:26-28 (schema)The input schema for the 'get_automation' tool, defining a single required 'automation_id' parameter typed as a string via Zod.
inputSchema: { automation_id: z.string().describe("The automation ID to retrieve"), }, - src/tools/automations.ts:22-34 (registration)The full tool definition object including config (title, description, inputSchema) and handler for 'get_automation', exported as part of the automationTools object.
get_automation: { config: { title: "Get Automation Details", description: "Get detailed information about a specific automation including all steps and settings", inputSchema: { automation_id: z.string().describe("The automation ID to retrieve"), }, }, handler: async ({ automation_id }: { automation_id: string }): Promise<ToolResult> => { const result = await makeRequest(`https://api.sendgrid.com/v3/marketing/automations/${automation_id}`); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; }, }, - src/tools/index.ts:9-17 (registration)The 'get_automation' tool is re-exported via the allTools object which spreads automationTools.
export const allTools = { ...automationTools, ...campaignTools, ...contactTools, ...mailTools, ...miscTools, ...statsTools, ...templateTools, }; - src/index.ts:20-23 (registration)The tool is registered with the MCP server by iterating over allTools entries and calling server.registerTool(name, config, handler).
// Register all tools for (const [name, tool] of Object.entries(allTools)) { server.registerTool(name, tool.config as any, tool.handler as any); }