list_tasks
Retrieve all tasks from your default Google Tasks list using the Google Tasks MCP Server. Manage and organize tasks effectively with this integration tool.
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)The handler function for the 'list_tasks' tool. It checks if the requested tool is 'list_tasks', calls the Google Tasks API to list tasks in the default tasklist, and returns the tasks as JSON text content.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:155-162 (registration)The registration of the 'list_tasks' tool in the ListToolsRequestSchema handler. Defines the tool name, description, and empty input schema (no parameters required).name: "list_tasks", description: "List all tasks in the default task list", inputSchema: { type: "object", properties: {}, }, }, {
- src/index.ts:157-160 (schema)The input schema for the 'list_tasks' tool, specifying an empty object (no input parameters needed).inputSchema: { type: "object", properties: {}, },