Skip to main content
Glama

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
NameRequiredDescriptionDefault
contentYes
descriptionNo
due_onNo
project_idYes
todolist_idYes

Implementation Reference

  • 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}.`, }, ], }; }
  • 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 },
  • 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}.`, }, ], }; } );
  • Call to registerTodoTools(server) which registers the create_todo tool among others in the main MCP server.
    registerTodoTools(server);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/craigashields/basecamp-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server