Skip to main content
Glama
deyikong

SendGrid MCP Server

by deyikong

Get Template Version

get_template_version

Retrieve details for a specific SendGrid email template version by providing template and version IDs.

Instructions

Retrieve details of a specific template version

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
template_idYesID of the template
version_idYesID of the version to retrieve

Implementation Reference

  • Handler function that retrieves details of a specific template version by making an authenticated API request to SendGrid's templates endpoint.
    handler: async ({ template_id, version_id }: { template_id: string; version_id: string }): Promise<ToolResult> => {
      const result = await makeRequest(`https://api.sendgrid.com/v3/templates/${template_id}/versions/${version_id}`);
      return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
    },
  • Zod input schema defining required string parameters: template_id and version_id.
    inputSchema: {
      template_id: z.string().describe("ID of the template"),
      version_id: z.string().describe("ID of the version to retrieve"),
    },
  • Spreads templateTools (which includes get_template_version) into the allTools object export.
    ...templateTools,
  • src/index.ts:21-23 (registration)
    Dynamically registers all tools from allTools with the MCP server via registerTool, including get_template_version.
    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 but offers minimal behavioral insight. It indicates a read operation ('Retrieve'), but doesn't disclose permissions needed, rate limits, error conditions, or response format. For a tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves.

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 waste. It's front-loaded with the core action and resource, making it easy to parse. Every word earns its place without redundancy or fluff.

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 no annotations and no output schema, the description is incomplete for a read operation. It doesn't explain what 'details' are returned (e.g., content, metadata, status), error handling, or any behavioral constraints. For a tool with rich sibling context and no structured safety hints, more completeness is needed.

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%, with both parameters clearly documented in the schema. The description adds no additional meaning beyond implying retrieval of a 'specific' version, which is already covered by the schema's parameter descriptions. Baseline 3 is appropriate as the schema does the heavy lifting.

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 action ('Retrieve details') and resource ('specific template version'), making the purpose evident. It distinguishes from siblings like 'get_template' (which likely retrieves template metadata) by specifying version retrieval. However, it doesn't explicitly contrast with 'update_template_version' or 'delete_template_version', missing full sibling differentiation.

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 guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., needing a template_id and version_id), nor does it contrast with similar tools like 'get_template' or 'list_templates'. Usage is implied but not explicitly stated.

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