volkern_complete_task
Mark tasks as completed in Volkern CRM by providing the task ID to update task status and track progress within AI workflows.
Instructions
Mark a task as completed
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| taskId | Yes | The task's unique ID |
Implementation Reference
- src/index.ts:819-820 (handler)Handler implementation for volkern_complete_task tool. Makes a PATCH request to /tasks/{taskId} endpoint with { completada: true } to mark a task as completed.
case "volkern_complete_task": return volkernRequest(`/tasks/${args.taskId}`, "PATCH", { completada: true }); - src/index.ts:294-304 (schema)Tool schema definition for volkern_complete_task. Defines the tool name, description, and inputSchema requiring a taskId parameter (string type) to identify which task to complete.
{ name: "volkern_complete_task", description: "Mark a task as completed", inputSchema: { type: "object", properties: { taskId: { type: "string", description: "The task's unique ID" } }, required: ["taskId"] } }, - src/index.ts:956-958 (registration)Server registration of the tools list (including volkern_complete_task) using ListToolsRequestSchema handler.
server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; }); - src/index.ts:26-55 (helper)Helper function volkernRequest that handles all API communication. Constructs URLs, adds authentication headers, serializes request bodies, and handles API responses/errors. Used by volkern_complete_task to make the PATCH request.
async function volkernRequest( endpoint: string, method: string = "GET", body?: Record<string, unknown> ): Promise<unknown> { const url = `${VOLKERN_API_URL}${endpoint}`; const options: RequestInit = { method, headers: { "Authorization": `Bearer ${VOLKERN_API_KEY}`, "Content-Type": "application/json", }, }; if (body && method !== "GET") { options.body = JSON.stringify(body); } const response = await fetch(url, options); if (!response.ok) { const errorData = await response.json().catch(() => ({})); throw new Error( `Volkern API Error (${response.status}): ${JSON.stringify(errorData)}` ); } return response.json(); }