get_text_templates
Retrieve available language templates to create new proposals in Offorte Proposal Software.
Instructions
Lists available language text templates which are used to create new proposals
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- Full tool definition for 'get_text_templates' including the execute handler that fetches text templates from API, validates with schema, and returns JSON.export const getTextTemplatesTool: Tool<undefined, typeof parameters> = { name: 'get_text_templates', description: 'Lists available language text templates which are used to create new proposals', parameters, annotations: { title: 'Get Language Text Templates', openWorldHint: true, }, async execute() { const result = await get('/settings/text-templates'); const parsed = textTemplatesSchema.safeParse(result); if (!parsed.success) { throwApiInvalidResponseError(parsed.error); } return JSON.stringify(parsed.data); }, };
- src/schemas/settings.ts:21-28 (schema)Zod schema definitions for textTemplateSchema and textTemplatesSchema (array) used for output validation in the tool handler.export const textTemplateSchema = z .object({ id: z.number(), name: z.string(), }) .passthrough(); export const textTemplatesSchema = z.array(textTemplateSchema);
- src/tools/register.ts:19-39 (registration)Registration of getTextTemplatesTool in the tools array and subsequent addition to the FastMCP server via registerTools function.const tools = [ getInitialContextTool, getAccountUsersTool, getAutomationSetsTool, getContactDetailsTool, getDesignTemplatesTool, getEmailTemplatesTool, getProposalDirectoriesTool, getProposalTemplatesTool, getTextTemplatesTool, searchContactOrganisationsTool, searchContactPeopleTool, searchProposalsTool, createContactTool, createProposalTool, sendProposalTool, ]; export function registerTools({ server }: { server: FastMCP }) { (tools as unknown as FastMCPTool<Record<string, unknown>, ToolParameters>[]).map(initialContextGuard).forEach((tool) => server.addTool(tool)); }