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
| Name | Required | Description | Default |
|---|---|---|---|
| template_id | Yes | ID of the template | |
| version_id | Yes | ID of the version to retrieve |
Implementation Reference
- src/tools/templates.ts:191-194 (handler)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) }] }; },
- src/tools/templates.ts:186-189 (schema)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"), },
- src/tools/index.ts:16-16 (registration)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); }