Skip to main content
Glama

get_email_templates

Retrieve available email templates for sending proposals in Offorte Proposal Software.

Instructions

Lists available email templates which are used to send proposals

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The async execute() function implements the core logic: fetches email templates from the '/settings/email-templates' API, safely parses the response using emailTemplatesSchema, throws error if invalid, and returns the JSON stringified parsed data.
    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 schema definitions for a single email template (id and name) and the array of templates, used to validate the API response in the tool handler.
    export const emailTemplateSchema = z .object({ id: z.number(), name: z.string(), }) .passthrough(); export const emailTemplatesSchema = z.array(emailTemplateSchema);
  • The registerTools function adds all tools, including getEmailTemplatesTool (imported and listed in the tools array), to the FastMCP server instance.
    export function registerTools({ server }: { server: FastMCP }) { (tools as unknown as FastMCPTool<Record<string, unknown>, ToolParameters>[]).map(initialContextGuard).forEach((tool) => server.addTool(tool)); }
  • Includes getEmailTemplatesTool in the array of tools to be registered.
    getEmailTemplatesTool,
  • Imports the getEmailTemplatesTool for registration.
    import { getEmailTemplatesTool } from './settings/get-email-templates.js';

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