Skip to main content
Glama

complete_task

Mark a task as completed by providing its UUID, enhancing task management within the MCP Think Tank system for efficient problem-solving workflows.

Instructions

Mark a task as completed.

Input Schema

NameRequiredDescriptionDefault
idYesUUID of the task to mark as completed

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "id": { "description": "UUID of the task to mark as completed", "format": "uuid", "type": "string" } }, "required": [ "id" ], "type": "object" }

Implementation Reference

  • The complete_task tool registration and handler implementation. Validates the task ID using CompleteTaskSchema, retrieves the task from storage, updates its status to 'done', and returns the result as JSON.
    server.addTool({ name: "complete_task", description: "Mark a task as completed.", execute: async (params: any) => { try { // Validate input parameters const validatedParams = CompleteTaskSchema.parse(params); const task = taskStorage.get(validatedParams.id); if (!task) { return JSON.stringify({ error: `Task with ID ${validatedParams.id} not found` }); } // Update task status to done const updatedTask = taskStorage.update(validatedParams.id, { status: "done" }); return JSON.stringify({ task: updatedTask, message: "Task marked as completed" }); } catch (error) { return JSON.stringify({ error: `Invalid complete_task parameters: ${error instanceof Error ? error.message : String(error)}` }); } } });
  • Zod schema defining the input parameters for the complete_task tool: a required UUID string for the task ID.
    // Schema for complete_task parameters const CompleteTaskSchema = z.object({ id: z.string().uuid() });

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/flight505/mcp-think-tank'

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