Skip to main content
Glama

get_email_templates

Browse available email templates for sending proposals to clients. Find pre-built formats to communicate your business offers effectively.

Instructions

Lists available email templates which are used to send proposals

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "type": "object" }

Implementation Reference

  • Full tool definition including name, description, parameters, annotations, and the execute handler that fetches and validates email templates from the API.
    export const getEmailTemplatesTool: Tool<undefined, typeof parameters> = { name: 'get_email_templates', description: 'Lists available email templates which are used to send proposals', parameters, annotations: { title: 'Get Email Templates', openWorldHint: true, }, async execute() { const result = await get('/settings/email-templates'); const parsed = emailTemplatesSchema.safeParse(result); if (!parsed.success) { throwApiInvalidResponseError(parsed.error); } return JSON.stringify(parsed.data); }, };
  • Zod schemas defining the structure of an email template (id and name) and array of templates, used for parsing the API response.
    export const emailTemplateSchema = z .object({ id: z.number(), name: z.string(), }) .passthrough(); export const emailTemplatesSchema = z.array(emailTemplateSchema);
  • Import of the getEmailTemplatesTool for registration.
    import { getEmailTemplatesTool } from './settings/get-email-templates.js';
  • Inclusion of getEmailTemplatesTool in the array of tools to be registered with the MCP server.
    getEmailTemplatesTool,
  • Registration function that adds all tools, including getEmailTemplatesTool, to the FastMCP server.
    export function registerTools({ server }: { server: FastMCP }) { (tools as unknown as FastMCPTool<Record<string, unknown>, ToolParameters>[]).map(initialContextGuard).forEach((tool) => server.addTool(tool)); }

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/offorte/offorte-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server