Skip to main content
Glama
deyikong

SendGrid MCP Server

by deyikong

Open Single Send Stats

open_single_send_stats

Open the statistics page for a single send campaign to analyze its performance.

Instructions

Open single send stats page for a specific campaign

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
singlesend_idYesThe single send ID to view stats for

Implementation Reference

  • The handler function for the open_single_send_stats tool. It takes a singlesend_id parameter and returns a URL to view stats for that single send campaign in SendGrid's web interface.
    open_single_send_stats: {
      config: {
        title: "Open Single Send Stats",
        description: "Open single send stats page for a specific campaign",
        inputSchema: {
          singlesend_id: z.string().describe("The single send ID to view stats for"),
        },
      },
      handler: async ({ singlesend_id }: { singlesend_id: string }): Promise<ToolResult> => {
        return {
          content: [
            {
              type: "text",
              text: `Please open this URL in your browser to view stats for single send ${singlesend_id}:\nhttps://mc.sendgrid.com/single-sends/${singlesend_id}/stats?view=raw`,
            },
          ],
        };
      },
    },
  • The input schema for open_single_send_stats, defining the singlesend_id parameter (required string).
    config: {
      title: "Open Single Send Stats",
      description: "Open single send stats page for a specific campaign",
      inputSchema: {
        singlesend_id: z.string().describe("The single send ID to view stats for"),
      },
    },
  • src/index.ts:20-23 (registration)
    Registration of all tools (including open_single_send_stats) from allTools into the MCP server via server.registerTool().
    // Register all tools
    for (const [name, tool] of Object.entries(allTools)) {
      server.registerTool(name, tool.config as any, tool.handler as any);
    }
  • The campaignTools object that contains open_single_send_stats alongside other campaign-related tools. This is exported and merged into allTools.
    export const campaignTools = {
      list_single_sends: {
        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"),
          },
        },
        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 allTools object which aggregates all tool objects from different modules, including campaignTools.
    export const allTools = {
      ...automationTools,
      ...campaignTools,
      ...contactTools,
      ...mailTools,
      ...miscTools,
      ...statsTools,
      ...templateTools,
    };
Behavior2/5

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

No annotations are available, so the description carries the full burden. It only states the action 'open page' without disclosing side effects, permissions, or return behavior. This lacks sufficient transparency for a tool with no annotations.

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

Conciseness4/5

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

The description is a single sentence with no extraneous words, which is efficient. However, it sacrifices critical information for brevity, so it is not a 5.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is insufficiently complete. It does not explain what 'open' entails, how the page is displayed, or whether it returns a status, leaving the agent without necessary context.

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 provides a description for singlesend_id (100% coverage). The tool description adds no additional semantic value beyond the schema, only repeating the concept of 'specific campaign'. 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 'Open single send stats page for a specific campaign' clearly identifies the action (open) and resource (single send stats page). It distinguishes from sibling tools like open_single_send_creator and get_stats_* tools, making the purpose unambiguous.

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?

No usage guidelines are provided; the description does not specify when to use this tool versus alternatives like get_stats_overview or other open_* tools. Without context, an agent may not know if this is for UI navigation or data retrieval.

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