list_tasks
Retrieve all tasks from the default task list in Google Tasks to view and manage your to-do items.
Instructions
List all tasks in the default task list
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:189-209 (handler)Handler logic for the 'list_tasks' tool. Calls the Google Tasks API to list tasks in the default tasklist and returns the result as formatted JSON text in the tool response.if (request.params.name === "list_tasks") { try { const response = await tasks.tasks.list({ tasklist: "@default", }); return { content: [ { type: "text", text: JSON.stringify(response.data.items, null, 2), }, ], }; } catch (error) { throw new McpError( ErrorCode.InternalError, `Tasks API error: ${error}` ); } }
- src/index.ts:154-161 (registration)Registration of the 'list_tasks' tool in the ListToolsRequestSchema handler, including its name, description, and input schema (which expects no parameters).{ name: "list_tasks", description: "List all tasks in the default task list", inputSchema: { type: "object", properties: {}, }, },
- src/index.ts:157-160 (schema)Input schema definition for the 'list_tasks' tool, specifying an empty object (no required parameters).inputSchema: { type: "object", properties: {}, },