get_task
Retrieve a full Kanboard task by its numeric ID, including status, dates, column, swimlane, and metadata. Returns NOT_FOUND if the task does not exist.
Instructions
Retrieve a single Kanboard task by its numeric id. Returns the full task entity including status, dates, column, swimlane, and metadata. Returns NOT_FOUND when the task does not exist.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | The task id to retrieve (must be a positive integer). |
Implementation Reference
- src/tools/get-task.ts:46-62 (handler)The get_task tool definition and handler function. Parses input via GetTaskInput schema, calls deps.handler.getTask(), and returns the task as JSON content plus structured object.
export const getTaskTool = { name: "get_task", description: "Retrieve a single Kanboard task by its numeric id. " + "Returns the full task entity including status, dates, column, swimlane, and metadata. " + "Returns NOT_FOUND when the task does not exist.", inputSchema: GetTaskInput, handler: async (raw: unknown, deps: ToolDeps): Promise<GetTaskResult> => { const input = GetTaskInput.parse(raw); const task = await deps.handler.getTask(input.task_id); return { content: [{ type: "text", text: JSON.stringify(task, null, 2) }], structuredContent: task, }; }, }; - src/tools/get-task.ts:16-20 (schema)Zod input schema for get_task: requires a positive integer task_id, strict mode.
export const GetTaskInput = z .object({ task_id: z.number().int().positive().describe("The task id to retrieve (must be a positive integer)."), }) .strict(); - src/handler/kanboard.ts:412-416 (helper)KanboardHandler.getTask() helper method that calls the Kanboard API client with 'getTask' JSON-RPC method and decodes the result via TaskSchema.
public async getTask(taskId: number): Promise<Task> { const raw = await this.#apiClient.call("getTask", { task_id: taskId }); this.#logger.debug({ method: "getTask" }, "getTask OK"); return decodeGetSingle("getTask", raw, TaskSchema, this.#logger); } - src/tools/index.ts:54-54 (registration)Import of getTaskTool from ./get-task.js into the central tools index.
import { getTaskTool } from "./get-task.js"; - src/tools/index.ts:96-96 (registration)Re-export of getTaskTool from the central tools barrel module.
export { getTaskTool } from "./get-task.js";