nworks_task_delete
Delete tasks in LINE WORKS by specifying the task ID, requiring user authentication with task and user.read scopes.
Instructions
할 일을 삭제합니다. taskId는 nworks_task_list로 조회 가능. User OAuth 인증 필요 (task + user.read scope)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| taskId | Yes | 삭제할 할 일 ID (nworks_task_list로 조회 가능) |
Implementation Reference
- src/api/task.ts:270-288 (handler)The deleteTask function executes the API request to delete a task by its taskId.
export async function deleteTask( taskId: string, profile = "default" ): Promise<void> { const url = `${BASE_URL}/tasks/${sanitizePathSegment(taskId)}`; if (process.env["NWORKS_VERBOSE"] === "1") { console.error(`[nworks] DELETE ${url}`); } const res = await authedFetch( url, { method: "DELETE" }, profile ); if (res.status === 204) return; if (!res.ok) return handleError(res); } - src/mcp/tools.ts:761-776 (registration)The "nworks_task_delete" tool is registered here and calls taskApi.deleteTask.
server.tool( "nworks_task_delete", "할 일을 삭제합니다. taskId는 nworks_task_list로 조회 가능. User OAuth 인증 필요 (task + user.read scope)", { taskId: z.string().describe("삭제할 할 일 ID (nworks_task_list로 조회 가능)"), }, async ({ taskId }) => { try { await taskApi.deleteTask(taskId); return { content: [{ type: "text" as const, text: JSON.stringify({ success: true, taskId, message: "할 일이 삭제되었습니다" }) }], }; } catch (err) { return { content: [{ type: "text" as const, text: mcpErrorHint(err, "task.delete") }], isError: true,