get_task
Retrieve the full details of a task by supplying its task ID. Returns title, description, status, and other attributes.
Instructions
Returns details of a specific task by ID.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Task ID |
Implementation Reference
- src/tools/tasks.ts:123-132 (handler)The get_task tool handler: registered via server.tool(), extracts the Task by ID via SpClient.getTask(id) and returns the result.
// ── Get single task ───────────────────────────────────────────────────── server.tool( "get_task", "Returns details of a specific task by ID.", { id: z.string().describe("Task ID") }, async ({ id }) => { const task = await SpClient.getTask(id); return ok(task); } ); - src/tools/tasks.ts:123-132 (registration)Registration of the 'get_task' tool: server.tool('get_task', ...) inside registerTaskTools().
// ── Get single task ───────────────────────────────────────────────────── server.tool( "get_task", "Returns details of a specific task by ID.", { id: z.string().describe("Task ID") }, async ({ id }) => { const task = await SpClient.getTask(id); return ok(task); } ); - src/tools/tasks.ts:125-127 (schema)Schema for get_task: expects a single required 'id' parameter of type z.string().
"get_task", "Returns details of a specific task by ID.", { id: z.string().describe("Task ID") }, - src/sp-client.ts:220-222 (helper)SpClient.getTask(id): sends GET /tasks/{id} and parses the response with TaskSchema.
getTask(id: string): Promise<Task> { return request(`/tasks/${id}`, TaskSchema); }, - src/index.ts:16-16 (registration)Top-level registration: registerTaskTools(server) is called from the entry point.
registerTaskTools(server);