Skip to main content
Glama
deyikong

SendGrid MCP Server

by deyikong

Get Template Details

get_template

Retrieve template details and versions from SendGrid to manage email content and ensure consistent messaging across campaigns.

Instructions

Retrieve details of a specific template including all versions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
template_idYesID of the template to retrieve

Implementation Reference

  • The handler function executes the tool logic by making an API request to SendGrid to fetch details of the specified template ID and returns the result as formatted JSON text.
    handler: async ({ template_id }: { template_id: string }): Promise<ToolResult> => {
      const result = await makeRequest(`https://api.sendgrid.com/v3/templates/${template_id}`);
      return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
    },
  • The tool configuration including title, description, and Zod input schema for validating the template_id parameter.
    config: {
      title: "Get Template Details",
      description: "Retrieve details of a specific template including all versions",
      inputSchema: {
        template_id: z.string().describe("ID of the template to retrieve"),
      },
    },
  • src/index.ts:21-23 (registration)
    The MCP server registration loop that registers the get_template tool (along with all others) by calling server.registerTool with its name, config, and handler.
    for (const [name, tool] of Object.entries(allTools)) {
      server.registerTool(name, tool.config as any, tool.handler as any);
    }
  • Spreading templateTools into allTools object, which includes the get_template tool definition.
    ...templateTools,
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states it's a retrieval operation ('Retrieve details'), implying read-only behavior, but doesn't disclose authentication needs, rate limits, error conditions, response format, or whether it returns all template data or just metadata. For a read operation with zero annotation coverage, this leaves significant behavioral gaps.

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 that directly states the tool's purpose. It's front-loaded with the core action ('Retrieve details') and includes the key scope ('including all versions'). There's no wasted verbiage or redundancy.

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 has 1 parameter with 100% schema coverage but no annotations and no output schema, the description is minimally adequate. It clarifies the scope ('including all versions'), which isn't obvious from the name alone, but doesn't address behavioral aspects like response format or error handling. For a simple read tool, it meets basic needs but lacks depth.

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?

Schema description coverage is 100% (the single parameter 'template_id' is fully described in the schema as 'ID of the template to retrieve'). The description doesn't add any parameter-specific information beyond what the schema provides, such as format examples or constraints. With high schema coverage, the baseline score of 3 is appropriate.

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 ('Retrieve details') and resource ('specific template'), specifying that it includes 'all versions'. This distinguishes it from sibling tools like 'get_template_version' (single version) and 'list_templates' (list without details). However, it doesn't explicitly differentiate from other 'get_' tools like 'get_contact' in terms of resource type.

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. It doesn't mention when to use 'get_template' vs 'list_templates' (for listing without details) or 'get_template_version' (for single version details). No prerequisites, exclusions, or comparison with sibling tools 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