Skip to main content
Glama
kydycode

Enhanced Todoist MCP Server Extended

todoist_quick_add_task

Create Todoist tasks using natural language input to quickly add tasks with due dates, projects, and labels through text parsing.

Instructions

Create a task using Todoist's Quick Add feature with natural language parsing

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesNatural language text for quick task creation (e.g., 'Buy milk tomorrow at 2pm #shopping')
noteNoAdditional note for the task (optional)
reminderNoReminder time (optional)

Implementation Reference

  • Executes the tool by validating arguments with isQuickAddArgs and calling todoistClient.quickAddTask with the provided text, optional note, and reminder.
    if (name === "todoist_quick_add_task") {
      if (!isQuickAddArgs(args)) {
        throw new Error("Invalid arguments for todoist_quick_add_task");
      }
      
      const quickAddData: any = { text: args.text };
      if (args.note) quickAddData.note = args.note;
      if (args.reminder) quickAddData.reminder = args.reminder;
    
      const result = await todoistClient.quickAddTask(quickAddData);
      return {
        content: [{ 
          type: "text", 
          text: `Task created via Quick Add:\n${JSON.stringify(result, null, 2)}` 
        }],
        isError: false,
      };
    }
  • Tool definition including name, description, and JSON input schema specifying required 'text' and optional 'note' and 'reminder'.
    const QUICK_ADD_TASK_TOOL: Tool = {
      name: "todoist_quick_add_task",
      description: "Create a task using Todoist's Quick Add feature with natural language parsing",
      inputSchema: {
        type: "object",
        properties: {
          text: {
            type: "string",
            description: "Natural language text for quick task creation (e.g., 'Buy milk tomorrow at 2pm #shopping')"
          },
          note: {
            type: "string",
            description: "Additional note for the task (optional)"
          },
          reminder: {
            type: "string",
            description: "Reminder time (optional)"
          }
        },
        required: ["text"]
      }
    };
  • src/index.ts:1083-1121 (registration)
    Registers the tool by including QUICK_ADD_TASK_TOOL in the list returned by ListToolsRequestSchema handler.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [
        // Task tools
        CREATE_TASK_TOOL,
        QUICK_ADD_TASK_TOOL,
        GET_TASKS_TOOL,
        GET_TASK_TOOL,
        UPDATE_TASK_TOOL,
        DELETE_TASK_TOOL,
        COMPLETE_TASK_TOOL,
        REOPEN_TASK_TOOL,
        SEARCH_TASKS_TOOL,
        MOVE_TASK_TOOL,
        BULK_MOVE_TASKS_TOOL,
        // Project tools
        GET_PROJECTS_TOOL,
        GET_PROJECT_TOOL,
        CREATE_PROJECT_TOOL,
        UPDATE_PROJECT_TOOL,
        DELETE_PROJECT_TOOL,
        // Section tools
        GET_SECTIONS_TOOL,
        CREATE_SECTION_TOOL,
        UPDATE_SECTION_TOOL,
        DELETE_SECTION_TOOL,
        // Label tools
        CREATE_LABEL_TOOL,
        GET_LABEL_TOOL,
        GET_LABELS_TOOL,
        UPDATE_LABEL_TOOL,
        DELETE_LABEL_TOOL,
        // Comment tools
        CREATE_COMMENT_TOOL,
        GET_COMMENT_TOOL,
        GET_COMMENTS_TOOL,
        UPDATE_COMMENT_TOOL,
        DELETE_COMMENT_TOOL,
      ],
    }));
  • Type guard function used in the handler to validate input arguments for the todoist_quick_add_task tool.
    function isQuickAddArgs(args: unknown): args is {
      text: string;
      note?: string;
      reminder?: string;
    } {
      return (
        typeof args === "object" &&
        args !== null &&
        "text" in args &&
        typeof (args as { text: string }).text === "string"
      );
    }

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/kydycode/todoist-mcp-server-ext'

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