import { z } from 'zod'; import { saveTemplate, Template } from '../storage/templates.js'; import { logger } from '../config/logging.js'; /** * Input schema for the Create Template tool */ export const createTemplateSchema = z.object({ name: z.string().min(1, "Template name is required"), description: z.string().optional(), content: z.string().min(1, "Template content is required"), tags: z.array(z.string()).optional(), }); /** * Type for the input parameters */ export type CreateTemplateParams = z.infer; /** * Create a new PRD template in storage * * @param name - The name of the template * @param description - Optional description of the template * @param content - Markdown content of the template * @param tags - Optional array of tags * @returns The created Template object */ export async function createTemplate( name: string, description: string | undefined, content: string, tags?: string[] ): Promise