create-task
Create a new task with a title and description in the Kanban MCP Server. Organize and manage Kanban-style tasks with clear priorities, tags, and status tracking.
Instructions
create a new todo task
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | Yes | ||
| task_title | Yes |
Implementation Reference
- src/index.ts:55-73 (handler)MCP tool handler for 'create-task': calls createTask utility and returns formatted response.async (params) => { try { await mongooseUtils.createTask(params); return { content: [ { type: "text", text: `Task "${params.task_title}" created successfully!`, }, ], }; } catch { return { content: [ { type: "text", text: "An error occurred while creating the task." }, ], }; } }
- src/index.ts:44-47 (schema)Zod input schema for the create-task tool parameters.{ task_title: z.string(), description: z.string(), },
- src/index.ts:41-74 (registration)Registration of the 'create-task' tool on the MCP server, including name, description, schema, hints, and handler.server.tool( "create-task", "create a new todo task", { task_title: z.string(), description: z.string(), }, { title: "create a todo task", readonlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true, }, async (params) => { try { await mongooseUtils.createTask(params); return { content: [ { type: "text", text: `Task "${params.task_title}" created successfully!`, }, ], }; } catch { return { content: [ { type: "text", text: "An error occurred while creating the task." }, ], }; } } );
- src/utils/mongoose.ts:29-47 (helper)Core implementation of task creation: creates a new Task document with default 'todo' status and associates it with the user.export async function createTask(params: CreateTaskParams): Promise<void> { const newTask = await Task.create({ title: params.task_title, description: params.description, taskStatus: "todo", }); // You may need to adjust how you get the user const user = await User.findOne({ username: username, }); if (user) { newTask.user = user; await newTask.save(); user.tasks.push(newTask); await user.save(); } }
- src/utils/mongoose.ts:24-27 (schema)TypeScript interface defining parameters for createTask function.export interface CreateTaskParams { task_title: string; description: string; }