Skip to main content
Glama
MAG-Cie

MCP for Microsoft To Do

batch_complete_tasks

Idempotent

Batch complete tasks in Microsoft To Do by marking up to 100 items as done in a single request.

Instructions

Mark several tasks as completed in a single $batch HTTP call (up to 100 items).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYes
verboseNoIf true: returns full JSON. Otherwise: compact text format (default, saves tokens).

Implementation Reference

  • Actual implementation of batchCompleteTasks: creates PATCH requests for each task with status='completed' and sends via graphBatch, then parses responses.
    export async function batchCompleteTasks(
      items: Array<{ listId: string; taskId: string }>
    ): Promise<Array<BatchResultItem<TodoTask>>> {
      const requests: BatchRequest[] = items.map((item, idx) => ({
        id: String(idx),
        method: "PATCH",
        url: `/me/todo/lists/${enc(item.listId)}/tasks/${enc(item.taskId)}`,
        body: { status: "completed" },
      }));
      const responses = await graphBatch(requests);
      return parseBatchResponses<TodoTask>(responses, items.length);
    }
  • Zod schema for batch_complete_tasks input validation (items array of list_id/task_id, min 1, max 100).
    batch_complete_tasks: z.object({
      items: z
        .array(z.object({ list_id: z.string(), task_id: z.string() }))
        .min(1)
        .max(100),
      ...verboseField,
    }),
  • src/index.ts:788-810 (registration)
    Tool registration in ListToolsRequestSchema handler: defines name, description, and JSON inputSchema for batch_complete_tasks.
      name: "batch_complete_tasks",
      description:
        "Mark several tasks as completed in a single $batch HTTP call (up to 100 items).",
      inputSchema: {
        type: "object",
        properties: {
          items: {
            type: "array",
            maxItems: 100,
            items: {
              type: "object",
              properties: {
                list_id: { type: "string" },
                task_id: { type: "string" },
              },
              required: ["list_id", "task_id"],
            },
          },
          ...verboseJsonProp,
        },
        required: ["items"],
      },
    },
  • CallToolRequestSchema handler case for batch_complete_tasks: parses args with Zod, maps snake_case to camelCase, calls batchCompleteTasks, formats output.
    case "batch_complete_tasks": {
      const a = schemas.batch_complete_tasks.strict().parse(args);
      const results = await batchCompleteTasks(
        a.items.map((it) => ({ listId: it.list_id, taskId: it.task_id }))
      );
      return out(results, a.verbose, (rs) => formatBatchCompact(rs, formatTaskCompact));
  • src/index.ts:482-482 (registration)
    Tool annotation registration: batch_complete_tasks marked as WRITE_UPDATE (readOnlyHint=false, destructiveHint=false, idempotentHint=true, openWorldHint=true).
    batch_complete_tasks:   { ...WRITE_UPDATE, title: "Batch complete tasks" },
Behavior3/5

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

Annotations already provide idempotentHint and destructiveHint. The description adds the batch call nature and size limit, but does not disclose error behavior or state changes beyond 'completed'. With annotations present, the added value is moderate.

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

Conciseness4/5

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

The description is a single sentence, concise and front-loaded, but could include minimal parameter hints without becoming verbose.

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?

For a batch mutation tool with no output schema, the description covers the limit and call type but omits error handling, idempotency details (though annotations cover it), and return format information, leaving some gaps.

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

Parameters2/5

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

The input schema has 50% description coverage, with 'items' parameter lacking any description. The description does not explain the 'items' or 'verbose' parameters, missing a chance to clarify the required list_id/task_id fields or the output format toggle.

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 'Mark' and resource 'tasks', and clearly states 'several tasks' and 'batch HTTP call', distinguishing it from the sibling 'complete_task' for single tasks and other batch siblings.

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 implies usage for batch operations with a 100-item limit, but does not explicitly state when to use it vs the single-task sibling 'complete_task' or when not to use it. No alternatives are named.

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/MAG-Cie/mcp-microsoft-todo'

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