Skip to main content
Glama
aafsar

Task Manager MCP Server

by aafsar

clear_completed

Remove all completed tasks to declutter your task list and focus on active items.

Instructions

Remove all completed tasks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that executes the clear_completed tool logic: loads tasks, filters out completed tasks, saves the updated storage, and returns a formatted message indicating the number of tasks cleared.
    export async function clearCompleted() {
      const storage = await loadTasks();
      const originalCount = storage.tasks.length;
    
      // Filter out completed tasks
      storage.tasks = storage.tasks.filter((t) => t.status !== "completed");
      const removedCount = originalCount - storage.tasks.length;
    
      await saveTasks(storage);
    
      const message =
        removedCount > 0
          ? `๐Ÿงน Cleared ${removedCount} completed task(s). ${storage.tasks.length} active task(s) remaining.`
          : "No completed tasks to clear.";
    
      return {
        content: [
          {
            type: "text",
            text: message,
          },
        ],
      };
    }
  • src/index.ts:179-186 (registration)
    Tool registration in the TOOLS array used for ListTools response, defining name, description, and input schema (empty object since no parameters required).
    {
      name: "clear_completed",
      description: "Remove all completed tasks",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • src/index.ts:236-237 (registration)
    Switch case in the CallToolRequestHandler that routes requests for 'clear_completed' to the clearCompleted handler function.
    case "clear_completed":
      return await clearCompleted();
  • Input schema definition for the clear_completed tool, specifying an empty object since the tool takes no arguments.
    inputSchema: {
      type: "object",
      properties: {},
    },
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Remove all completed tasks' implies a destructive operation but doesn't specify if this is permanent deletion, archiving, or reversible. It doesn't mention side effects (e.g., affecting task statistics), permissions required, or rate limits. The description is minimal and lacks critical behavioral context for a mutation tool.

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 a single, efficient sentence with zero wasted words. It's front-loaded with the core action and target, making it immediately understandable. Every word earns its place in conveying the tool's purpose.

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

Completeness2/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 inadequate. It doesn't explain what 'remove' entails (deletion vs. archiving), whether it's reversible, what permissions are needed, or what the response looks like. Given the complexity of a batch removal operation and lack of structured data, more context is needed for safe and effective use.

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?

The tool has 0 parameters, and schema description coverage is 100% (empty schema). The description doesn't need to explain parameters, so it meets baseline expectations. No additional parameter semantics are required or provided.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Remove all completed tasks' clearly states the action (remove) and target resource (completed tasks). It distinguishes from siblings like 'delete_task' (specific task deletion) and 'complete_task' (marking tasks as complete). However, it doesn't specify whether this applies to all tasks globally or within a specific scope, which prevents a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'delete_task' (for individual tasks) or 'complete_task' (for marking tasks as complete). It doesn't mention prerequisites, permissions needed, or whether this is irreversible versus archiving. The agent must infer usage from the name alone.

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/aafsar/task-manager-mcp-server'

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