Skip to main content
Glama

complete_task

Mark a task complete or uncomplete by specifying its GUID. Sets completion timestamp to now or clears it.

Instructions

[Official API + UAT, v1.3.7] Mark a task complete (or uncomplete it). Convenience wrapper around update_task with completed_at.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_guidYesTask GUID
completedNotrue → mark complete (uses Date.now()); false → uncomplete (sets completed_at to "0"). Default true.

Implementation Reference

  • The handler function that executes the 'complete_task' tool. It extracts the 'completed' boolean (defaulting to true), then calls the official client's completeTask method, returning a text response indicating completion or uncompletion.
    async complete_task(args, ctx) {
      const completed = args.completed === undefined ? true : !!args.completed;
      const r = await ctx.getOfficialClient().completeTask(args.task_guid, completed);
      return text(`Task ${completed ? 'completed' : 'uncompleted'}: ${args.task_guid}`);
    },
  • The input schema for the 'complete_task' tool. Defines the tool's name, description, and inputSchema with properties 'task_guid' (required string) and 'completed' (optional boolean, default true).
    {
      name: 'complete_task',
      description: '[Official API + UAT, v1.3.7] Mark a task complete (or uncomplete it). Convenience wrapper around update_task with completed_at.',
      inputSchema: {
        type: 'object',
        properties: {
          task_guid: { type: 'string', description: 'Task GUID' },
          completed: { type: 'boolean', description: 'true → mark complete (uses Date.now()); false → uncomplete (sets completed_at to "0"). Default true.' },
        },
        required: ['task_guid'],
      },
    },
  • src/server.js:51-57 (registration)
    Registration of the tasks tool module in the server. Line 51 requires './tools/tasks', and lines 56-57 collect all schemas and handlers into TOOLS and HANDLERS for the MCP server.
      require('./tools/tasks'),
      require('./tools/uploads'),
      require('./tools/wiki'),
    ];
    
    const TOOLS = TOOL_MODULES.flatMap((m) => m.schemas);
    const HANDLERS = Object.fromEntries(TOOL_MODULES.flatMap((m) => Object.entries(m.handlers)));
  • The helper/client method 'completeTask' that actually performs the API call. It computes a completed_at timestamp (Date.now() for true, '0' for false) and delegates to updateTask with the ['completed_at'] field.
    // completed=true marks done now; completed=false un-completes (sets completed_at to "0")
    async completeTask(taskGuid, completed = true) {
      if (!taskGuid) throw new Error('completeTask: task_guid is required');
      const completedAt = completed ? String(Date.now()) : '0';
      return this.updateTask(taskGuid, { completed_at: completedAt }, ['completed_at']);
    },
Behavior4/5

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

The description discloses internal behavior: uses Date.now() for completion and sets completed_at to '0' for uncompletion. No annotations exist, so the description adequately covers the tool's effects, but could mention permission requirements or side effects.

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 no redundant words. Every element adds value, making it easy to parse.

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?

For a simple wrapper tool with a clear schema and no output schema, the description adequately explains the core functionality. It could mention that only completed_at is affected, but the 'convenience wrapper' hint suffices given sibling updates.

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 coverage is 100%, baseline 3. The description adds meaningful context beyond the schema, detailing the exact date behavior (Date.now() and '0'), which enhances understanding of the 'completed' parameter.

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 tool marks a task complete or uncomplete, and explicitly distinguishes itself as a convenience wrapper around update_task. This differentiates it from sibling tools like update_task.

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?

The description implies usage for simple completion toggling and hints at update_task for more complex updates. However, it does not explicitly state when not to use this tool or list alternatives, leaving some room for ambiguity.

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/EthanQC/feishu-user-plugin'

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