list_checklist_items
Retrieve all checklist items from a specified task in Microsoft To Do. Returns detailed JSON or compact text format based on preference.
Instructions
List the sub-items (checklist) of a task.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| list_id | Yes | ||
| task_id | Yes | ||
| verbose | No | If true: returns full JSON. Otherwise: compact text format (default, saves tokens). | |
| paginate | No | If true: follows @odata.nextLink up to 20 pages (≈2000 items max). Default false. Use sparingly — large result sets may exhaust the LLM context window. |
Implementation Reference
- src/graph.ts:651-661 (handler)The actual implementation of listChecklistItems — makes a GET request to the Microsoft Graph /checklistItems endpoint, optionally supporting pagination. Calls graphFetch to retrieve ChecklistItem objects from the API.
export async function listChecklistItems( listId: string, taskId: string, opts: { select?: string; paginate?: boolean } = {} ): Promise<ChecklistItem[]> { const select = opts.select ?? DEFAULT_CHECKLIST_SELECT; const path = `/me/todo/lists/${enc(listId)}/tasks/${enc(taskId)}/checklistItems?$select=${encodeODataValue(select)}`; if (opts.paginate) return paginateAll<ChecklistItem>(path); const data = await graphFetch<GraphCollection<ChecklistItem>>(path); return data.value; } - src/index.ts:218-223 (schema)Zod schema defining the input arguments for list_checklist_items: list_id (string), task_id (string), plus optional verbose and paginate fields.
list_checklist_items: z.object({ list_id: z.string(), task_id: z.string(), ...verboseField, ...paginateField, }), - src/graph.ts:83-89 (schema)TypeScript interface for the ChecklistItem type returned by listChecklistItems. Contains id, displayName, isChecked, createdDateTime, and optional checkedDateTime.
export interface ChecklistItem { id: string; displayName: string; isChecked: boolean; createdDateTime: string; checkedDateTime?: string; } - src/index.ts:659-672 (registration)Tool registration with name 'list_checklist_items', description 'List the sub-items (checklist) of a task.', and JSON Schema input requiring list_id and task_id.
{ name: "list_checklist_items", description: "List the sub-items (checklist) of a task.", inputSchema: { type: "object", properties: { list_id: { type: "string" }, task_id: { type: "string" }, ...verboseJsonProp, ...paginateJsonProp, }, required: ["list_id", "task_id"], }, }, - src/formatters.ts:67-69 (helper)Compact formatter used to display a single checklist item as a text line (id, checked status, and displayName).
export function formatChecklistCompact(c: ChecklistItem): string { return `${c.id} ${c.isChecked ? "[v]" : "[ ]"} ${JSON.stringify(c.displayName)}`; }