Skip to main content
Glama
jhirono

Microsoft Todo MCP Service

by jhirono

get-checklist-items

Retrieve subtasks and smaller components for a specific Microsoft Todo task to track progress and manage detailed steps.

Instructions

Get checklist items (subtasks) for a specific task. Checklist items are smaller steps or components that belong to a parent task.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
listIdYesID of the task list
taskIdYesID of the task

Implementation Reference

  • Registration of the 'get-checklist-items' MCP tool, including name, description, input schema, and inline handler function that fetches checklist items via Microsoft Graph API.
    server.tool(
      "get-checklist-items",
      "Get checklist items (subtasks) for a specific task. Checklist items are smaller steps or components that belong to a parent task.",
      {
        listId: z.string().describe("ID of the task list"),
        taskId: z.string().describe("ID of the task"),
      },
      async ({ listId, taskId }) => {
        try {
          const token = await getAccessToken();
          if (!token) {
            return {
              content: [
                {
                  type: "text",
                  text: "Failed to authenticate with Microsoft API",
                },
              ],
            };
          }
    
          // Fetch the task first to get its title
          const taskResponse = await makeGraphRequest<Task>(
            `${MS_GRAPH_BASE}/me/todo/lists/${listId}/tasks/${taskId}`,
            token
          );
          
          const taskTitle = taskResponse ? taskResponse.title : "Unknown Task";
    
          // Fetch the checklist items
          const response = await makeGraphRequest<{ value: ChecklistItem[] }>(
            `${MS_GRAPH_BASE}/me/todo/lists/${listId}/tasks/${taskId}/checklistItems`,
            token
          );
          
          if (!response) {
            return {
              content: [
                {
                  type: "text",
                  text: `Failed to retrieve checklist items for task: ${taskId}`,
                },
              ],
            };
          }
    
          const items = response.value || [];
          if (items.length === 0) {
            return {
              content: [
                {
                  type: "text",
                  text: `No checklist items found for task "${taskTitle}" (ID: ${taskId})`,
                },
              ],
            };
          }
    
          const formattedItems = items.map((item) => {
            const status = item.isChecked ? "✓" : "○";
            let itemInfo = `${status} ${item.displayName} (ID: ${item.id})`;
            
            // Add creation date if available
            if (item.createdDateTime) {
              const createdDate = new Date(item.createdDateTime).toLocaleString();
              itemInfo += `\nCreated: ${createdDate}`;
            }
            
            return itemInfo;
          });
    
          return {
            content: [
              {
                type: "text",
                text: `Checklist items for task "${taskTitle}" (ID: ${taskId}):\n\n${formattedItems.join("\n\n")}`,
              },
            ],
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error fetching checklist items: ${error}`,
              },
            ],
          };
        }
      }
    );
  • Handler function that authenticates, fetches the parent task title, retrieves checklist items from Microsoft Graph API endpoint `/me/todo/lists/{listId}/tasks/{taskId}/checklistItems`, formats them with check status and creation date, and returns formatted text response.
    async ({ listId, taskId }) => {
      try {
        const token = await getAccessToken();
        if (!token) {
          return {
            content: [
              {
                type: "text",
                text: "Failed to authenticate with Microsoft API",
              },
            ],
          };
        }
    
        // Fetch the task first to get its title
        const taskResponse = await makeGraphRequest<Task>(
          `${MS_GRAPH_BASE}/me/todo/lists/${listId}/tasks/${taskId}`,
          token
        );
        
        const taskTitle = taskResponse ? taskResponse.title : "Unknown Task";
    
        // Fetch the checklist items
        const response = await makeGraphRequest<{ value: ChecklistItem[] }>(
          `${MS_GRAPH_BASE}/me/todo/lists/${listId}/tasks/${taskId}/checklistItems`,
          token
        );
        
        if (!response) {
          return {
            content: [
              {
                type: "text",
                text: `Failed to retrieve checklist items for task: ${taskId}`,
              },
            ],
          };
        }
    
        const items = response.value || [];
        if (items.length === 0) {
          return {
            content: [
              {
                type: "text",
                text: `No checklist items found for task "${taskTitle}" (ID: ${taskId})`,
              },
            ],
          };
        }
    
        const formattedItems = items.map((item) => {
          const status = item.isChecked ? "✓" : "○";
          let itemInfo = `${status} ${item.displayName} (ID: ${item.id})`;
          
          // Add creation date if available
          if (item.createdDateTime) {
            const createdDate = new Date(item.createdDateTime).toLocaleString();
            itemInfo += `\nCreated: ${createdDate}`;
          }
          
          return itemInfo;
        });
    
        return {
          content: [
            {
              type: "text",
              text: `Checklist items for task "${taskTitle}" (ID: ${taskId}):\n\n${formattedItems.join("\n\n")}`,
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: `Error fetching checklist items: ${error}`,
            },
          ],
        };
      }
    }
  • Zod input schema defining required parameters: listId (task list ID) and taskId (task ID).
    {
      listId: z.string().describe("ID of the task list"),
      taskId: z.string().describe("ID of the task"),
    },
  • TypeScript interface defining the structure of a ChecklistItem used in the tool's response typing.
    interface ChecklistItem {
      id: string;
      displayName: string;
      isChecked: boolean;
      createdDateTime?: string;
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description must convey behavioral traits. 'Get' implies a read-only operation, but it does not explicitly disclose whether there are side effects, pagination, or the shape of the returned data. It explains the nature of checklist items, which adds some context, but not enough for higher transparency.

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, front-loaded with the purpose. It avoids unnecessary wording and earns its place.

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

Completeness4/5

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

For a simple retrieval tool with two documented parameters and no output schema, the description is largely complete. It could improve by mentioning that the result is a list of checklist item objects, but it is adequate for correct selection and invocation.

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 provides 100% coverage with descriptions for both listId and taskId. The description does not add additional parameter semantics beyond what the schema already states, so it meets the baseline for high schema coverage.

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 clearly states the function: 'Get checklist items (subtasks) for a specific task.' It uses a specific verb ('Get'), names the resource ('checklist items'), and defines scope ('for a specific task'). It also clarifies the concept of subtasks, which distinguishes it from sibling tools like create/update/delete-checklist-item.

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

Usage Guidelines4/5

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

The description implies when to use this tool (when needing to retrieve checklist items for a task) and the verb 'Get' contrasts with mutation siblings. However, it does not explicitly name alternatives or state when not to use it, so it falls short of a full guideline.

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