Skip to main content
Glama
jhirono

Microsoft Todo MCP Service

by jhirono

create-checklist-item

Add a checklist item to break down Microsoft Todo tasks into smaller, manageable steps for better organization and progress tracking.

Instructions

Create a new checklist item (subtask) for a task. Checklist items help break down a task into smaller, manageable steps.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
listIdYesID of the task list
taskIdYesID of the task
displayNameYesText content of the checklist item
isCheckedNoWhether the item is checked off

Implementation Reference

  • Registers the 'create-checklist-item' MCP tool, including its description, input schema, and handler function.
    server.tool(
      "create-checklist-item",
      "Create a new checklist item (subtask) for a task. Checklist items help break down a task into smaller, manageable steps.",
      {
        listId: z.string().describe("ID of the task list"),
        taskId: z.string().describe("ID of the task"),
        displayName: z.string().describe("Text content of the checklist item"),
        isChecked: z.boolean().optional().describe("Whether the item is checked off")
      },
      async ({ listId, taskId, displayName, isChecked }) => {
        try {
          const token = await getAccessToken();
          if (!token) {
            return {
              content: [
                {
                  type: "text",
                  text: "Failed to authenticate with Microsoft API",
                },
              ],
            };
          }
    
          // Prepare the request body
          const requestBody: any = {
            displayName
          };
    
          if (isChecked !== undefined) {
            requestBody.isChecked = isChecked;
          }
    
          // Make the API request to create the checklist item
          const response = await makeGraphRequest<ChecklistItem>(
            `${MS_GRAPH_BASE}/me/todo/lists/${listId}/tasks/${taskId}/checklistItems`,
            token,
            "POST",
            requestBody
          );
          
          if (!response) {
            return {
              content: [
                {
                  type: "text",
                  text: `Failed to create checklist item for task: ${taskId}`,
                },
              ],
            };
          }
    
          return {
            content: [
              {
                type: "text",
                text: `Checklist item created successfully!\nContent: ${response.displayName}\nID: ${response.id}`,
              },
            ],
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error creating checklist item: ${error}`,
              },
            ],
          };
        }
      }
    );
  • The main handler function for the tool: authenticates via getAccessToken, constructs the request body with displayName and optional isChecked, performs a POST request to the Microsoft Graph API endpoint for checklistItems, and returns formatted success or error messages.
    async ({ listId, taskId, displayName, isChecked }) => {
      try {
        const token = await getAccessToken();
        if (!token) {
          return {
            content: [
              {
                type: "text",
                text: "Failed to authenticate with Microsoft API",
              },
            ],
          };
        }
    
        // Prepare the request body
        const requestBody: any = {
          displayName
        };
    
        if (isChecked !== undefined) {
          requestBody.isChecked = isChecked;
        }
    
        // Make the API request to create the checklist item
        const response = await makeGraphRequest<ChecklistItem>(
          `${MS_GRAPH_BASE}/me/todo/lists/${listId}/tasks/${taskId}/checklistItems`,
          token,
          "POST",
          requestBody
        );
        
        if (!response) {
          return {
            content: [
              {
                type: "text",
                text: `Failed to create checklist item for task: ${taskId}`,
              },
            ],
          };
        }
    
        return {
          content: [
            {
              type: "text",
              text: `Checklist item created successfully!\nContent: ${response.displayName}\nID: ${response.id}`,
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: `Error creating checklist item: ${error}`,
            },
          ],
        };
      }
    }
  • Zod input schema defining the required parameters listId, taskId, displayName and optional isChecked for creating a checklist item.
    {
      listId: z.string().describe("ID of the task list"),
      taskId: z.string().describe("ID of the task"),
      displayName: z.string().describe("Text content of the checklist item"),
      isChecked: z.boolean().optional().describe("Whether the item is checked off")
    },
  • TypeScript interface defining the structure of a ChecklistItem, used for typing the API response in the handler.
    interface ChecklistItem {
      id: string;
      displayName: string;
      isChecked: boolean;
      createdDateTime?: string;
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior2/5

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

No annotations are provided, and the description does not disclose behavioral traits such as required permissions, side effects, idempotency, or return values. It only states the action and purpose, leaving the full burden on the description for a write operation.

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 two concise sentences. The first states the action clearly, and the second adds useful context about the tool's purpose. There is no unnecessary wording, and it is front-loaded with the main verb and resource.

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

Completeness3/5

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

Given that there is no output schema and no annotations, the description is adequate for a simple create operation but lacks additional context such as return value or prerequisites. The schema covers all parameters, so the main gap is behavioral context.

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?

The input schema has 100% description coverage for all four parameters, so the baseline is 3. The description adds no additional parameter-specific meaning beyond what the schema already states; it merely reiterates the overall action.

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

Purpose5/5

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

The description uses the specific verb 'Create' and clearly identifies the resource as 'a new checklist item (subtask) for a task.' It further explains the purpose ('break down a task into smaller, manageable steps'), which distinguishes it from siblings like create-task and create-task-list.

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

Usage Guidelines3/5

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

The description provides only implied usage: 'Help break down a task into smaller, manageable steps' suggests when to use it, but it does not explicitly state when to use it versus alternatives, nor does it mention exclusions or prerequisites.

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