Skip to main content
Glama
vitalio-sh

Enhanced Todoist MCP Server Extended

todoist_create_task

Create new Todoist tasks with detailed options like subtasks, due dates, priorities, labels, and project organization.

Instructions

Create a new task in Todoist with comprehensive options including subtasks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesThe content/title of the task
descriptionNoDetailed description of the task (optional)
projectIdNoProject ID to create the task in (optional)
sectionIdNoSection ID to create the task in (optional)
parentIdNoParent task ID to create this as a subtask (optional)
dueStringNoNatural language due date like 'tomorrow', 'next Monday', 'Jan 23' (optional)
priorityNoTask priority from 1 (normal) to 4 (urgent) (optional)
labelsNoArray of label names to assign to the task (optional)

Implementation Reference

  • Handler for todoist_create_task: validates input with isCreateTaskArgs, builds task data object, calls todoistClient.addTask(taskData), and returns formatted success response with task details.
    if (name === "todoist_create_task") {
      if (!isCreateTaskArgs(args)) {
        throw new Error("Invalid arguments for todoist_create_task");
      }
      const taskData: any = {
        content: args.content,
      };
      if (args.description) taskData.description = args.description;
      if (args.projectId) taskData.projectId = args.projectId;
      if (args.sectionId) taskData.sectionId = args.sectionId;
      if (args.parentId) taskData.parentId = args.parentId;
      if (args.dueString) taskData.dueString = args.dueString;
      if (args.priority) taskData.priority = args.priority;
      if (args.labels && args.labels.length > 0) taskData.labels = args.labels;
    
      const task = await todoistClient.addTask(taskData);
      return {
        content: [{ 
          type: "text", 
          text: `Task created successfully:\nID: ${task.id}\n${formatTask(task)}` 
        }],
        isError: false,
      };
    }
  • Tool schema definition for todoist_create_task, including input schema with properties like content (required), description, projectId, sectionId, parentId, dueString, priority, and labels.
    const CREATE_TASK_TOOL: Tool = {
      name: "todoist_create_task",
      description: "Create a new task in Todoist with comprehensive options including subtasks",
      inputSchema: {
        type: "object",
        properties: {
          content: {
            type: "string",
            description: "The content/title of the task"
          },
          description: {
            type: "string",
            description: "Detailed description of the task (optional)"
          },
          projectId: {
            type: "string",
            description: "Project ID to create the task in (optional)"
          },
          sectionId: {
            type: "string",
            description: "Section ID to create the task in (optional)"
          },
          parentId: {
            type: "string",
            description: "Parent task ID to create this as a subtask (optional)"
          },
          dueString: {
            type: "string",
            description: "Natural language due date like 'tomorrow', 'next Monday', 'Jan 23' (optional)"
          },
          priority: {
            type: "number",
            description: "Task priority from 1 (normal) to 4 (urgent) (optional)",
            enum: [1, 2, 3, 4]
          },
          labels: {
            type: "array",
            items: { type: "string" },
            description: "Array of label names to assign to the task (optional)"
          }
        },
        required: ["content"]
      }
    };
  • src/index.ts:1083-1121 (registration)
    Registration of the todoist_create_task tool (as CREATE_TASK_TOOL) in the ListToolsRequestSchema handler, making it discoverable by clients.
    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 helper function isCreateTaskArgs used to validate input arguments for the todoist_create_task handler.
    function isCreateTaskArgs(args: unknown): args is { 
      content: string;
      description?: string;
      projectId?: string;
      sectionId?: string;
      parentId?: string;
      dueString?: string;
      priority?: number;
      labels?: string[];
    } {
      return (
        typeof args === "object" &&
        args !== null &&
        "content" in args &&
        typeof (args as { content: string }).content === "string"
      );
    }
  • Shared helper function formatTask used to format task details in responses, including for todoist_create_task.
    function formatTask(task: any): string {
      let taskDetails = `- ID: ${task.id}\n  Content: ${task.content}`;
      if (task.description) taskDetails += `\n  Description: ${task.description}`;
      if (task.due) taskDetails += `\n  Due: ${task.due.string}`;
      if (task.priority && task.priority > 1) taskDetails += `\n  Priority: ${task.priority}`;
      if (task.labels && task.labels.length > 0) taskDetails += `\n  Labels: ${task.labels.join(', ')}`;
      if (task.projectId) taskDetails += `\n  Project ID: ${task.projectId}`;
      if (task.sectionId) taskDetails += `\n  Section ID: ${task.sectionId}`;
      if (task.parentId) taskDetails += `\n  Parent ID: ${task.parentId}`;
      if (task.url) taskDetails += `\n  URL: ${task.url}`;
      if (task.commentCount > 0) taskDetails += `\n  Comments: ${task.commentCount}`;
      if (task.createdAt) taskDetails += `\n  Created At: ${task.createdAt}`;
      if (task.creatorId) taskDetails += `\n  Creator ID: ${task.creatorId}`;
      return taskDetails;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states 'Create a new task' which implies a write/mutation operation, but doesn't disclose behavioral traits like authentication requirements, rate limits, error conditions, or what happens on success (e.g., returns a task ID). For a mutation tool with zero annotation coverage, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core action ('Create a new task') and adds a useful qualifier ('with comprehensive options including subtasks'). There's no wasted verbiage or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., a task object or ID), error handling, or side effects. For a tool with 8 parameters and significant functionality, more context is needed to guide effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 8 parameters thoroughly. The description adds minimal value by mentioning 'comprehensive options including subtasks', which hints at the 'parentId' parameter but doesn't provide additional semantics beyond what's in the schema. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Create') and resource ('new task in Todoist'), and mentions 'comprehensive options including subtasks' which adds specificity. However, it doesn't explicitly differentiate from sibling tools like 'todoist_quick_add_task' or 'todoist_update_task', which would require a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'todoist_quick_add_task' (which might be for simpler tasks) or 'todoist_update_task' (for modifications). There's no mention of prerequisites, constraints, or typical use cases beyond the basic action.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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

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