Skip to main content
Glama
MAG-Cie

MCP for Microsoft To Do

batch_create_tasks

Create up to 100 tasks in a single batch call to Microsoft Graph, auto-chunked for reliability. Reduces API calls compared to individual task creation.

Instructions

Create several tasks in a single HTTP call via Microsoft Graph $batch (up to 100 items, auto-chunked by 20). Returns: status + result OR error per item, in order. More efficient than N create_task calls.

Input Schema

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

Implementation Reference

  • Core handler function that builds batch POST requests for creating tasks via Microsoft Graph $batch API. Maps each item to a request with URL `/me/todo/lists/{listId}/tasks`, calls graphBatch, and parses responses.
    export async function batchCreateTasks(
      items: Array<{ listId: string; task: CreateTaskInput }>
    ): Promise<Array<BatchResultItem<TodoTask>>> {
      const requests: BatchRequest[] = items.map((item, idx) => {
        const payload = buildTaskPayload(item.task);
        if (!payload.importance) payload.importance = "normal";
        return {
          id: String(idx),
          method: "POST",
          url: `/me/todo/lists/${enc(item.listId)}/tasks`,
          body: payload,
        };
      });
      const responses = await graphBatch(requests);
      return parseBatchResponses<TodoTask>(responses, items.length);
    }
  • Zod schema for batch_create_tasks defining input validation: items array (min 1, max 100) with list_id, title, and optional taskBaseFields.
    batch_create_tasks: z.object({
      items: z
        .array(
          z.object({
            list_id: z.string(),
            title: z.string(),
            ...taskBaseFields,
          })
        )
        .min(1)
        .max(100),
      ...verboseField,
  • src/index.ts:762-785 (registration)
    MCP tool registration block listing the name 'batch_create_tasks', description, and JSON Schema input definition (items array with list_id, title, and taskBaseJsonProps).
    {
      name: "batch_create_tasks",
      description:
        "Create several tasks in a single HTTP call via Microsoft Graph $batch (up to 100 items, auto-chunked by 20). Returns: status + result OR error per item, in order. More efficient than N create_task calls.",
      inputSchema: {
        type: "object",
        properties: {
          items: {
            type: "array",
            maxItems: 100,
            items: {
              type: "object",
              properties: {
                list_id: { type: "string" },
                title: { type: "string" },
                ...taskBaseJsonProps,
              },
              required: ["list_id", "title"],
            },
          },
          ...verboseJsonProp,
        },
        required: ["items"],
      },
  • src/index.ts:481-481 (registration)
    Tool metadata entry setting the title to 'Batch create tasks' with WRITE_CREATE category flags.
    batch_create_tasks:     { ...WRITE_CREATE, title: "Batch create tasks" },
  • Switch-case handler that parses args with the schema, transforms snake_case input to camelCase, calls batchCreateTasks from graph.ts, and formats the output.
    case "batch_create_tasks": {
      const a = schemas.batch_create_tasks.strict().parse(args);
      const items: Array<{ listId: string; task: CreateTaskInput }> = a.items.map(
        (it) => ({
          listId: it.list_id,
          task: {
            title: it.title,
            body: it.body,
            importance: it.importance,
            dueDateTime: it.due_date,
            timeZone: it.time_zone,
            categories: it.categories,
            recurrence: it.recurrence as PatternedRecurrence | undefined,
            isReminderOn: it.is_reminder_on,
            reminderDateTime: it.reminder_date_time,
            reminderTimeZone: it.reminder_time_zone,
          },
        })
      );
      const results = await batchCreateTasks(items);
      return out(results, a.verbose, (rs) => formatBatchCompact(rs, formatTaskCompact));
    }
Behavior4/5

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

Annotations show readOnlyHint=false and destructiveHint=false, indicating creation. Description adds return format (status/result/error per item in order) and auto-chunking. No contradictions.

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?

Three sentences, front-loaded with main action, no redundancy.

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?

Covers core issues: what, limits, return format, efficiency. Lacks details on per-item error structure, but sufficient for selection.

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

Parameters4/5

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

Schema covers verbose parameter with description. Description adds meaning by explaining return structure related to verbose. Items parameter not detailed in schema but description clarifies batch behavior.

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?

Description clearly states it creates tasks in batch via Graph $batch, with limit 100 and auto-chunking. Distinguishes from create_task by highlighting efficiency.

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?

Explicitly says more efficient than multiple create_task calls, implying use for multiple tasks. Also specifies constraints (100 items, chunked by 20). Lacks explicit when-not-to-use, but context is clear.

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