Skip to main content
Glama

complete_task

Mark a task as completed in Taskwarrior by claiming it with an agent ID, then automatically releasing it after finishing the task to manage workflow efficiently.

Instructions

Mark a task as done. Auto-claims then releases after completion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesTask ID or UUID
agent_idYesGlobally unique agent identifier (e.g. "claude-opus-<uuid>"). Each agent instance MUST use a distinct ID to prevent collisions between parallel agents.

Implementation Reference

  • The core logic that executes the 'done' command via Taskwarrior.
    export async function completeTask(id: string, agentId: string): Promise<void> {
      const uuid = await ensureClaim(id, agentId);
      try {
        await runCommand('task', ['rc.confirmation=no', uuid, 'done']);
      } catch (err) {
        throw new Error(`Failed to complete task ${id}: ${(err as Error).message}`);
      }
      await releaseClaim(uuid);
    }
  • src/index.ts:176-191 (registration)
    The registration of the 'complete_task' tool in the MCP server.
    server.tool(
      'complete_task',
      'Mark a task as done. Auto-claims then releases after completion.',
      {
        id: idParam,
        agent_id: agentIdParam,
      },
      async ({ id, agent_id }) => {
        try {
          await completeTask(id, agent_id);
          return { content: [{ type: 'text', text: `Task ${id} completed.` }] };
        } catch (err) {
          return { content: [{ type: 'text', text: (err as Error).message }], isError: true };
        }
      },
    );

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/maxronner/taskwarrior-mcp'

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