Skip to main content
Glama
aafsar

Task Manager MCP Server

by aafsar

complete_task

Mark a task as completed by providing its task ID to update task status in the Task Manager MCP Server.

Instructions

Mark a task as completed

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdYesTask ID (use first 8 characters)

Implementation Reference

  • The main handler function for the 'complete_task' tool. It validates the input task ID using TaskIdSchema, loads tasks from storage, finds the matching task by partial ID, updates its status to 'completed' and sets the completion timestamp, saves the changes, and returns a formatted success message with task details.
    export async function completeTask(args: unknown) {
      // Validate input
      const validated = TaskIdSchema.parse(args);
    
      // Load tasks
      const storage = await loadTasks();
    
      // Find task
      const task = storage.tasks.find((t) => t.id.startsWith(validated.taskId));
    
      if (!task) {
        return {
          content: [
            {
              type: "text",
              text: `❌ Task with ID ${validated.taskId} not found.`,
            },
          ],
        };
      }
    
      // Update status
      task.status = "completed";
      task.completedAt = new Date().toISOString();
      await saveTasks(storage);
    
      return {
        content: [
          {
            type: "text",
            text: `✅ Task completed!\n\n${formatTask(task)}`,
          },
        ],
      };
    }
  • Zod validation schema for the 'complete_task' tool input. Defines 'taskId' as a required string with minimum length 8 characters (first 8 chars of UUID). Used in completeTask and deleteTask functions.
    export const TaskIdSchema = z.object({
      taskId: z.string().min(8, "Task ID must be at least 8 characters"),
    });
  • src/index.ts:141-155 (registration)
    Tool registration in the TOOLS array for MCP server. Specifies name, description, and JSON Schema for input validation advertised to clients.
    {
      name: "complete_task",
      description: "Mark a task as completed",
      inputSchema: {
        type: "object",
        properties: {
          taskId: {
            type: "string",
            description: "Task ID (use first 8 characters)",
            minLength: 8,
          },
        },
        required: ["taskId"],
      },
    },
  • src/index.ts:227-228 (registration)
    Dispatch logic in the CallToolRequest handler switch statement. Routes 'complete_task' calls to the completeTask implementation.
    case "complete_task":
      return await completeTask(args);
  • src/index.ts:17-17 (registration)
    Import of the completeTask handler from './tools.js' for use in the MCP server.
    completeTask,
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool marks a task as completed, implying a mutation, but doesn't address permissions, whether the change is reversible, side effects, or response format. This is inadequate for a mutation tool without annotation support.

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 waste. It's front-loaded with the core action, making it easy to parse quickly, which is ideal for conciseness.

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?

Given this is a mutation tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits (e.g., error handling, permissions) and doesn't compensate for the absence of structured data, making it insufficient for safe and effective use by an agent.

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

Parameters3/5

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

Schema description coverage is 100%, with the parameter 'taskId' fully documented in the schema. The description doesn't add any meaning beyond the schema, such as format examples or contextual usage, so it meets the baseline for high schema coverage without providing extra value.

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 clearly states the action ('Mark as completed') and resource ('a task'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'update_task' which might also handle task completion, so it doesn't reach the highest 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?

No guidance is provided about when to use this tool versus alternatives like 'update_task' or 'clear_completed'. The description doesn't mention prerequisites (e.g., task must exist) or exclusions, leaving the agent to infer usage context.

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