get_design_templates
Browse available design templates to create new proposals in Offorte Proposal Software.
Instructions
Lists available design templates which are used to create new proposals
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The execute handler fetches design templates from the API endpoint '/settings/design-templates', parses the response using designTemplatesSchema, and returns the JSON string.async execute() { const result = await get('/settings/design-templates'); const parsed = designTemplatesSchema.safeParse(result); if (!parsed.success) { throwApiInvalidResponseError(parsed.error); } return JSON.stringify(parsed.data); },
- src/schemas/settings.ts:3-10 (schema)Zod schemas for individual designTemplate and the array of designTemplates used for input validation.export const designTemplateSchema = z .object({ id: z.number(), name: z.string(), }) .passthrough(); export const designTemplatesSchema = z.array(designTemplateSchema);
- src/tools/register.ts:37-39 (registration)The registerTools function registers all tools, including getDesignTemplatesTool from the tools array, 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)); }
- src/tools/register.ts:6-6 (registration)Import of the getDesignTemplatesTool for registration.import { getDesignTemplatesTool } from './settings/get-design-templates.js';
- src/tools/register.ts:24-24 (registration)Inclusion of getDesignTemplatesTool in the tools array for registration.getDesignTemplatesTool,