b24_tasks_complete
Marks a task as completed in Bitrix24. Provide the task ID to update its status.
Instructions
Marca una tarea como completada.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID de la tarea a completar | |
| webhook_url | No |
Implementation Reference
- src/tools/tasks.js:94-98 (handler)The actual handler function for b24_tasks_complete. It creates a Bitrix24Client, calls 'tasks.task.complete' API with the task ID, and returns success confirmation.
export async function tasksComplete({ id, webhook_url }) { const client = new Bitrix24Client(resolveWebhook(webhook_url)); await client.call('tasks.task.complete', { taskId: id }); return { portal: client.portal, completed_id: id, success: true }; } - src/tools/tasks.js:89-92 (schema)Zod schema for b24_tasks_complete input validation. Requires 'id' (string or number) and optional 'webhook_url'.
export const tasksCompleteSchema = z.object({ id: z.union([z.string(), z.number()]).describe('ID de la tarea a completar'), webhook_url: z.string().url().optional(), }); - index.js:191-193 (registration)Registration of the 'b24_tasks_complete' tool with the MCP server, linking the schema and handler.
server.tool('b24_tasks_complete', 'Marca una tarea como completada.', tasksCompleteSchema.shape, wrap(tasksComplete)); - src/tools/tasks.js:2-4 (helper)Imports used by the handler: Bitrix24Client for API calls and resolveWebhook for webhook URL resolution.
import { Bitrix24Client } from '../bitrix24/client.js'; import { fetchAllPages } from '../utils/pagination.js'; import { resolveWebhook } from '../utils/resolve-webhook.js';