create_todo
Add a new task to a Basecamp to-do list with specified content, description, and due date for project management.
Instructions
Create a new to-do in the given list.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | ||
| description | No | ||
| due_on | No | ||
| project_id | Yes | ||
| todolist_id | Yes |
Implementation Reference
- src/tools/todos.ts:23-41 (handler)The asynchronous handler function that executes the create_todo tool. It constructs a payload and makes a POST request to the Basecamp API to create a new todo item.async ({ project_id, todolist_id, content, description, due_on }) => { const payload: any = { content }; if (description) payload.description = description; if (due_on) payload.due_on = due_on; const todo = await bcRequest<any>( "POST", `/buckets/${project_id}/todolists/${todolist_id}/todos.json`, payload ); return { content: [ { type: "text", text: `Created to-do ${todo.id} in list ${todolist_id}.`, }, ], }; }
- src/tools/todos.ts:12-21 (schema)Zod input schema defining the parameters for the create_todo tool: project_id, todolist_id, content (required), description and due_on (optional).inputSchema: { project_id: z.number().int(), todolist_id: z.number().int(), content: z.string(), description: z.string().optional(), due_on: z .string() .regex(/^\d{4}-\d{2}-\d{2}$/) .optional(), // YYYY-MM-DD },
- src/tools/todos.ts:7-42 (registration)The server.registerTool call that registers the create_todo tool, including its schema and handler, within the registerTodoTools function.server.registerTool( "create_todo", { title: "Create a to-do", description: "Create a new to-do in the given list.", inputSchema: { project_id: z.number().int(), todolist_id: z.number().int(), content: z.string(), description: z.string().optional(), due_on: z .string() .regex(/^\d{4}-\d{2}-\d{2}$/) .optional(), // YYYY-MM-DD }, }, async ({ project_id, todolist_id, content, description, due_on }) => { const payload: any = { content }; if (description) payload.description = description; if (due_on) payload.due_on = due_on; const todo = await bcRequest<any>( "POST", `/buckets/${project_id}/todolists/${todolist_id}/todos.json`, payload ); return { content: [ { type: "text", text: `Created to-do ${todo.id} in list ${todolist_id}.`, }, ], }; } );
- src/basecamp-mcp.ts:14-14 (registration)Call to registerTodoTools(server) which registers the create_todo tool among others in the main MCP server.registerTodoTools(server);