Skip to main content
Glama
deyikong

SendGrid MCP Server

by deyikong

Get Automation Details

get_automation

Retrieve 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

TableJSON Schema
NameRequiredDescriptionDefault
automation_idYesThe automation ID to retrieve

Implementation Reference

  • 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) }] };
    },
  • 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"),
    },
  • 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) }] };
      },
    },
  • 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);
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden for behavioral transparency. It only states it 'gets detailed information' but does not disclose that it's read-only, response size, or any side effects. This is minimal transparency for a read operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that leads with the verb and resource, containing no unnecessary words. Every element adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the absence of an output schema, the description mentions 'including all steps and settings', providing some context on response content. For a simple one-parameter tool, this is mostly complete but could detail response structure further.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% coverage with a clear description for 'automation_id'. The tool description adds no additional meaning beyond the schema, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool gets detailed information about a specific automation, including steps and settings. The verb 'Get' and resource 'automation' are specific, and it distinguishes from sibling tools like 'list_automations' (which lists all) and 'delete_automation'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for retrieving details of a single automation but lacks explicit guidance on when to use this tool over alternatives like 'list_automations' or when not to use it. No exclusions or context about required ID are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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