Skip to main content
Glama
jhirono

Microsoft Todo MCP Service

delete-task-list

Remove a task list and all its tasks from Microsoft Todo to declutter your workspace and manage project containers.

Instructions

Delete a task list (top-level container) from Microsoft Todo. This will remove the list and all tasks within it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
listIdYesID of the task list to delete

Implementation Reference

  • The async handler function that executes the 'delete-task-list' tool logic. Authenticates using getAccessToken(), constructs the Microsoft Graph API DELETE URL `/me/todo/lists/${listId}`, calls makeGraphRequest, and returns success or error message.
    async ({ listId }) => {
      try {
        const token = await getAccessToken();
        if (!token) {
          return {
            content: [
              {
                type: "text",
                text: "Failed to authenticate with Microsoft API",
              },
            ],
          };
        }
    
        // Make a DELETE request to the Microsoft Graph API
        const url = `${MS_GRAPH_BASE}/me/todo/lists/${listId}`;
        console.error(`Deleting task list: ${url}`);
        
        // The DELETE method doesn't return a response body, so we expect null
        await makeGraphRequest<null>(
          url,
          token,
          "DELETE"
        );
        
        // If we get here, the delete was successful (204 No Content)
        return {
          content: [
            {
              type: "text",
              text: `Task list with ID: ${listId} was successfully deleted.`,
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: `Error deleting task list: ${error}`,
            },
          ],
        };
      }
    }
  • Zod input schema validation for the tool, requiring a 'listId' string parameter with description."
    {
      listId: z.string().describe("ID of the task list to delete")
    },
  • Registers the 'delete-task-list' tool with the MCP server instance using server.tool(name, description, inputSchema, handlerFn).
    server.tool(
      "delete-task-list",
      "Delete a task list (top-level container) from Microsoft Todo. This will remove the list and all tasks within it.",
      {
        listId: z.string().describe("ID of the task list to delete")
      },
      async ({ listId }) => {
        try {
          const token = await getAccessToken();
          if (!token) {
            return {
              content: [
                {
                  type: "text",
                  text: "Failed to authenticate with Microsoft API",
                },
              ],
            };
          }
    
          // Make a DELETE request to the Microsoft Graph API
          const url = `${MS_GRAPH_BASE}/me/todo/lists/${listId}`;
          console.error(`Deleting task list: ${url}`);
          
          // The DELETE method doesn't return a response body, so we expect null
          await makeGraphRequest<null>(
            url,
            token,
            "DELETE"
          );
          
          // If we get here, the delete was successful (204 No Content)
          return {
            content: [
              {
                type: "text",
                text: `Task list with ID: ${listId} was successfully deleted.`,
              },
            ],
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error deleting task list: ${error}`,
              },
            ],
          };
        }
      }
    );
Behavior2/5

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

No annotations are provided, so the description carries full burden. It discloses the destructive behavior ('remove the list and all tasks within it'), which is critical, but lacks other behavioral traits like authentication needs, error conditions, or confirmation requirements. The description is minimal but correctly indicates a destructive 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 sentences, front-loaded with the core action and resource, followed by scope clarification. Every word earns its place with no redundancy or fluff, making it highly efficient and easy to parse.

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 destructive tool with no annotations and no output schema, the description is adequate but incomplete. It covers the purpose and scope well, but lacks context on permissions, irreversibility, or response format. Given the complexity (destructive operation) and minimal structured data, it should provide more behavioral guidance.

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 description coverage is 100% for the single parameter 'listId', so the schema already documents it fully. The description doesn't add parameter-specific details beyond implying the parameter's role in identifying the list to delete. With 0 parameters needing extra semantics, baseline is 4.

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 specific action ('Delete'), target resource ('task list (top-level container) from Microsoft Todo'), and scope ('remove the list and all tasks within it'). It distinguishes this from sibling tools like 'delete-task' (individual tasks) and 'delete-checklist-item' (checklist items).

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 deleting entire task lists with all contained tasks, but doesn't explicitly state when to use this versus alternatives like 'delete-task' for individual tasks or provide exclusions (e.g., cannot be undone, requires list ownership). No prerequisites or warnings are mentioned.

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/jhirono/todoMCP'

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