get_design_templates
Browse available design templates to create professional proposals quickly. Access pre-designed layouts and formats for your proposal needs.
Instructions
Lists available design templates which are used to create new proposals
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"type": "object"
}
Implementation Reference
- Complete implementation of the 'get_design_templates' tool, including its name, description, parameters (empty), annotations, and the execute handler that fetches data from '/settings/design-templates', validates it with designTemplatesSchema, and returns JSON stringified data.export const getDesignTemplatesTool: Tool<undefined, typeof parameters> = { name: 'get_design_templates', description: 'Lists available design templates which are used to create new proposals', parameters, annotations: { title: 'Get Design Templates', openWorldHint: true, }, 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 a single design template (designTemplateSchema: object with id (number) and name (string), passthrough) and array of them (designTemplatesSchema), used to safely parse the API response in the tool handler.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 which adds all tools (including getDesignTemplatesTool from 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)); }
- src/tools/register.ts:19-35 (registration)The 'tools' array that collects all tool objects, including getDesignTemplatesTool at line 24, which is then registered via registerTools.const tools = [ getInitialContextTool, getAccountUsersTool, getAutomationSetsTool, getContactDetailsTool, getDesignTemplatesTool, getEmailTemplatesTool, getProposalDirectoriesTool, getProposalTemplatesTool, getTextTemplatesTool, searchContactOrganisationsTool, searchContactPeopleTool, searchProposalsTool, createContactTool, createProposalTool, sendProposalTool, ];