todo_create
Create a new task list with a title and optional description using the MCP TODO Checklist Server for organized task management and tracking.
Instructions
Cria uma nova lista de tarefas
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | No | Descrição da lista (opcional) | |
| title | Yes | Título da lista |
Implementation Reference
- src/index.ts:173-183 (handler)Handler for the todo_create tool. Parses arguments using createSchema, creates a new checklist via ChecklistService, and returns a success message.case "todo_create": { console.error('DEBUG - Processing todo_create'); const params = createSchema.parse(args); const newList = await checklistService.createChecklist({ title: params.title, description: params.description, owner: 'current-user', items: [] }); return { content: [{ type: "text", text: `Lista "${params.title}" criada com sucesso!` }] }; }
- src/index.ts:33-36 (schema)Zod schema for validating input parameters of todo_create (title required, description optional).const createSchema = z.object({ title: z.string(), description: z.string().optional() });
- src/index.ts:99-110 (registration)Tool registration in ListTools response, defining name, description, and input schema for MCP protocol.{ name: "todo_create", description: "Cria uma nova lista de tarefas", inputSchema: { type: "object", properties: { title: { type: "string", description: "Título da lista" }, description: { type: "string", description: "Descrição da lista (opcional)" }, }, required: ["title"], }, },
- src/service/ChecklistService.ts:7-19 (helper)Core helper method in ChecklistService that creates a new checklist with generated ID, timestamps, and empty items list, then saves it to storage.async createChecklist(data: Omit<Checklist, 'id' | 'createdAt' | 'updatedAt'>): Promise<Checklist> { const now = new Date(); const checklist: Checklist = { ...data, id: crypto.randomUUID(), createdAt: now, updatedAt: now, items: [] }; await this.storage.save(`checklist:${checklist.id}`, checklist); return checklist; }