get-task
Retrieve a specific Google Tasks item by providing its task list ID and task ID to access detailed information through Claude's interface.
Instructions
Get a specific task by ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tasklist | Yes | Task list ID | |
| task | Yes | Task ID |
Implementation Reference
- src/index.ts:549-589 (handler)Handler function that checks authentication, fetches the specific task using Google Tasks API tasks.tasks.get(), and returns the task data as JSON or error.async ({ tasklist, task }) => { if (!isAuthenticated()) { return { isError: true, content: [ { type: "text", text: "Not authenticated. Please use the 'authenticate' tool first.", }, ], }; } try { const response = await tasks.tasks.get({ tasklist, task, }); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { console.error("Error getting task:", error); return { isError: true, content: [ { type: "text", text: `Error getting task: ${error}`, }, ], }; } } );
- src/index.ts:545-548 (schema)Zod input schema validating the required tasklist ID and task ID parameters.{ tasklist: z.string().describe("Task list ID"), task: z.string().describe("Task ID"), },
- src/index.ts:542-544 (registration)Registration of the 'get-task' tool with name, description, schema, and handler function via server.tool().server.tool( "get-task", "Get a specific task by ID",