basecamp_create_todo
Add a new task to a Basecamp todo list by specifying title, content, and assignees. Manage project tasks directly through the MCP server.
Instructions
Create a new todo item in a todo list.
HTML rules for content:
Allowed tags: div, span, h1, br, strong, em, strike, a (with an href attribute), pre, ol, ul, li, blockquote, bc-attachment (with sgid attribute).
Try to be semantic despite the limitations of tags. Use double to create paragraph spacing
To mention people:
To consume less tokens, existing tags can be rewritten by dropping any attributes/inner content and just leave the "sgid" and "caption" attributes, without loosing any information
You can highlight parts of the content in this format ... valid colors are:
red: 255, 229, 229
yellow: 250, 247, 133
green: 228, 248, 226
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bucket_id | Yes | Basecamp resource identifier | |
| todolist_id | Yes | ||
| title | Yes | ||
| content | No | ||
| assignee_ids | No | Array of person IDs to assign to this todo |
Implementation Reference
- src/tools/todos.ts:176-208 (handler)The handler function that executes the tool logic: initializes Basecamp client and creates a todo with the given parameters.async (params) => { try { const client = await initializeBasecampClient(); const response = await client.todos.create({ params: { bucketId: params.bucket_id, todolistId: params.todolist_id, }, body: { content: params.title, description: params.content, assignee_ids: params.assignee_ids, }, }); if (response.status !== 201 || !response.body) { throw new Error("Failed to create todo"); } return { content: [ { type: "text", text: `Todo created!\n\nID: ${response.body.id}\nContent: ${response.body.content}`, }, ], }; } catch (error) { return { content: [{ type: "text", text: handleBasecampError(error) }], }; } },
- src/tools/todos.ts:159-168 (schema)Zod input schema defining required bucket_id, todolist_id, title, and optional content, assignee_ids.inputSchema: { bucket_id: BasecampIdSchema, todolist_id: BasecampIdSchema, title: z.string().min(1), content: z.string().optional(), assignee_ids: z .array(BasecampIdSchema) .optional() .describe("Array of person IDs to assign to this todo"), },
- src/tools/todos.ts:154-209 (registration)Registration of the basecamp_create_todo tool with MCP server, including title, description, inputSchema, annotations, and handler.server.registerTool( "basecamp_create_todo", { title: "Create Basecamp Todo", description: `Create a new todo item in a todo list. ${htmlRules}`, inputSchema: { bucket_id: BasecampIdSchema, todolist_id: BasecampIdSchema, title: z.string().min(1), content: z.string().optional(), assignee_ids: z .array(BasecampIdSchema) .optional() .describe("Array of person IDs to assign to this todo"), }, annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true, }, }, async (params) => { try { const client = await initializeBasecampClient(); const response = await client.todos.create({ params: { bucketId: params.bucket_id, todolistId: params.todolist_id, }, body: { content: params.title, description: params.content, assignee_ids: params.assignee_ids, }, }); if (response.status !== 201 || !response.body) { throw new Error("Failed to create todo"); } return { content: [ { type: "text", text: `Todo created!\n\nID: ${response.body.id}\nContent: ${response.body.content}`, }, ], }; } catch (error) { return { content: [{ type: "text", text: handleBasecampError(error) }], }; } }, );
- src/index.ts:63-63 (registration)Top-level registration call for all todo tools, including basecamp_create_todo.registerTodoTools(server);
- src/schemas/common.ts:10-12 (schema)Common Zod schema for Basecamp IDs, used in the input schema for this tool.export const BasecampIdSchema = z .number() .describe("Basecamp resource identifier");