Skip to main content
Glama
deyikong

SendGrid MCP Server

by deyikong

List Marketing Automations

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);
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states 'List all' but doesn't clarify if this returns all automations at once or uses pagination (though the schema hints at pagination). It doesn't mention permissions, rate limits, or what 'all' means in practice (e.g., active only, includes drafts). The description is minimal and lacks behavioral context.

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, efficient sentence with zero wasted words. It's front-loaded with the core action and resource. Every word earns its place, making it easy to parse quickly.

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

Completeness3/5

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

Given the tool's simplicity (list operation with 2 documented parameters) and lack of output schema, the description is minimally complete but leaves gaps. It doesn't explain what the output contains (e.g., automation names, IDs, status) or behavioral aspects like pagination behavior. For a basic list tool, it's adequate but could provide more context about the returned data.

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% description coverage, with both parameters ('offset' and 'limit') clearly documented as pagination controls. The description adds no additional parameter semantics beyond what's in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description.

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

Purpose4/5

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

The description clearly states the verb ('List') and resource ('marketing automations'), making the purpose immediately understandable. It distinguishes from siblings like 'list_contacts' or 'list_templates' by specifying the resource type. However, it doesn't explicitly differentiate from potential similar listing tools beyond the resource name.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites, appropriate contexts, or comparison with sibling tools like 'open_automation_creator' or 'open_automation_editor'. The agent must infer usage solely from the tool name and description.

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