Skip to main content
Glama
deyikong

SendGrid MCP Server

by deyikong

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); }

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