Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
bucket_idYesBasecamp resource identifier
todolist_idYes
titleYes
contentNo
assignee_idsNoArray of person IDs to assign to this todo

Implementation Reference

  • 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) }],
        };
      }
    },
  • 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"),
    },
  • 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);
  • Common Zod schema for Basecamp IDs, used in the input schema for this tool.
    export const BasecampIdSchema = z
      .number()
      .describe("Basecamp resource identifier");

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/stefanoverna/basecamp-mcp'

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