## Tool: `list_tasks`

Returns the user's tasks (to-dos and reminders). Unless `filter.taskListId` is set, tasks from all task lists are returned. By default, only uncompleted tasks are returned and deleted tasks are excluded. Tasks are not returned in the order shown in the Google Tasks apps; to get that order, sort tasks with the same task list and `parentTaskId` by `position`.

The following code sample shows how to use `curl` to call the `list_tasks` MCP tool.

| Curl Request |
|---|
| ```bash curl --location 'https://tasksmcp.googleapis.com/mcp/v1' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "list_tasks", "arguments": { // Provide these details according to the MCP tool specification. } }, "jsonrpc": "2.0", "id": 1 }' ``` |

## Input Schema

Request to list tasks for a given tasklist.

### ListTasksRequest

| JSON representation |
|---|
| ``` { "filter": { object (`TaskFilter`) }, "pageSize": integer, "pageToken": string } ``` |

| Fields ||
|---|---|
| Union field `_filter`. `_filter` can be only one of the following: ||
| `filter` | ``object (`TaskFilter`)`` Optional. Structured filtering criteria to filter returned tasks. |
|   ||
| Union field `_page_size`. `_page_size` can be only one of the following: ||
| `pageSize` | `integer` Optional. The maximum number of tasks to return, from `1` to `100`. Defaults to `100`. If more tasks match, the response contains a `nextPageToken` to get the next page. |
|   ||
| Union field `_page_token`. `_page_token` can be only one of the following: ||
| `pageToken` | `string` Optional. The `nextPageToken` received from a previous `list_tasks` call. All other request fields must match the call that returned the token. |
|   ||

### TaskFilter

| JSON representation |
|---|
| ``` { "taskListId": string, "state": enum (`State`), "timeFilter": { object (`TimeFilter`) }, "includeDeleted": boolean } ``` |

| Fields ||
|---|---|
| Union field `_task_list_id`. `_task_list_id` can be only one of the following: ||
| `taskListId` | `string` Optional. Filter tasks belonging to a specific task list. Use `"~default"` for the user's default task list. If not specified, tasks from all task lists will be returned. |
|   ||
| Union field `_state`. `_state` can be only one of the following: ||
| `state` | ``enum (`State`)`` Optional. Filter tasks by completion state. Defaults to `UNCOMPLETED` (or `COMPLETED` when `timeFilter.property` is `COMPLETED_TIME`). |
|   ||
| Union field `_time_filter`. `_time_filter` can be only one of the following: ||
| `timeFilter` | ``object (`TimeFilter`)`` Optional. Filter tasks by one of their date properties falling into a time window. |
|   ||
| Union field `_include_deleted`. `_include_deleted` can be only one of the following: ||
| `includeDeleted` | `boolean` Optional. Whether to include deleted tasks. Deleted tasks are returned with `deleted` set to `true` and can be restored with `undelete_task`. Defaults to `false`. |
|   ||

### TimeFilter

| JSON representation |
|---|
| ``` { "property": enum (`Property`), "startDate": string, "endDate": string, "timeZone": string } ``` |

| Fields ||
|---|---|
| `property` | ``enum (`Property`)`` Required. The task property the date window applies to. |
| Union field `_start_date`. `_start_date` can be only one of the following: ||
| `startDate` | `string` Optional. Inclusive first day of the window (YYYY-MM-DD). Omit `startDate` to query all tasks up to `endDate` (e.g. "everything that is still open and was due by Friday, including overdue tasks"). |
|   ||
| Union field `_end_date`. `_end_date` can be only one of the following: ||
| `endDate` | `string` Optional. Inclusive last day of the window (YYYY-MM-DD). Set `startDate` and `endDate` to the same day to query a single day. Omit `endDate` to query all tasks from `startDate` onwards (e.g. "tasks scheduled after today"). |
|   ||
| Union field `_time_zone`. `_time_zone` can be only one of the following: ||
| `timeZone` | `string` Optional. The IANA time zone ID (e.g., `"America/New_York"`, `"UTC"`) used to determine day boundaries for `COMPLETED_TIME`. Ignored for `SCHEDULED_TIME`. |
|   ||

### State

Completion state of the task.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | Unspecified state. Invalid; omit state to use the default. |
| `UNCOMPLETED` | Uncompleted (open) tasks. Use when answering "What do I still need to do?". Cannot be combined with a `COMPLETED_TIME` time filter. |
| `COMPLETED` | Completed tasks. Use when answering "What did I accomplish?". |
| `ALL` | Both completed and uncompleted tasks. Use when the completion state doesn't matter (e.g. "What was scheduled for last Monday?"). |

### Property

A time property of a task that can be filtered on. The window is currently day-granular.

| Enums ||
|---|---|
| `PROPERTY_UNSPECIFIED` | Unspecified property. Invalid; a property must be specified. |
| `SCHEDULED_TIME` | The day the task is scheduled for (`scheduledDate`). Use when searching for tasks scheduled for a specific date or date range (e.g. today or next week). |
| `COMPLETED_TIME` | The day the task was completed. Use when searching for tasks completed within a timeframe (e.g. finished yesterday or this month). |

## Output Schema

Response containing the list of tasks.

### ListTasksResponse

| JSON representation |
|---|
| ``` { "tasks": [ { object (`Task`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `tasks[]` | ``object (`Task`)`` List of tasks returned. |
| `nextPageToken` | `string` The token to pass as `pageToken` to get the next page of tasks. Empty if there are no more tasks. |

### Task

| JSON representation |
|---|
| ``` { "id": string, "lastModified": string, "attachments": [ { object (`Attachment`) } ], "taskListId": string, "title": string, "description": string, "completed": boolean, "deleted": boolean, "scheduledDate": string, "scheduledTime": string, "deadlineDate": string, "recurrenceRule": { object (`RecurrenceRule`) }, "link": string, "timeZone": string, "assignmentInfo": { object (`AssignmentInfo`) }, "parentTaskId": string, "position": integer } ``` |

| Fields ||
|---|---|
| `id` | `string` Output only. Unique ID of the task. Task IDs are not interchangeable with those of the Google Tasks REST API. |
| `lastModified` | `string` Output only. ISO 8601 last modified timestamp in UTC (e.g. `2026-08-19T10:00:00Z`). |
| `attachments[]` | ``object (`Attachment`)`` Output only. Attachments on the task. Currently, only Google Drive files are returned. |
| Union field `_task_list_id`. `_task_list_id` can be only one of the following: ||
| `taskListId` | `string` Optional. ID of the task list that this task belongs to. |
|   ||
| Union field `_title`. `_title` can be only one of the following: ||
| `title` | `string` Optional. Title of the task. May contain URLs. Empty if the task has no title. |
|   ||
| Union field `_description`. `_description` can be only one of the following: ||
| `description` | `string` Optional. Description or notes for the task. May contain URLs. |
|   ||
| Union field `_completed`. `_completed` can be only one of the following: ||
| `completed` | `boolean` Optional. Whether the task is completed. |
|   ||
| Union field `_deleted`. `_deleted` can be only one of the following: ||
| `deleted` | `boolean` Optional. Whether the task is deleted. |
|   ||
| Union field `_scheduled_date`. `_scheduled_date` can be only one of the following: ||
| `scheduledDate` | `string` Optional. Scheduled date of the task (YYYY-MM-DD). |
|   ||
| Union field `_scheduled_time`. `_scheduled_time` can be only one of the following: ||
| `scheduledTime` | `string` Optional. Scheduled time of the task (HH:MM:SS) in ISO 8601 extended format. |
|   ||
| Union field `_deadline_date`. `_deadline_date` can be only one of the following: ||
| `deadlineDate` | `string` Optional. Deadline date of the task (YYYY-MM-DD). |
|   ||
| Union field `_recurrence_rule`. `_recurrence_rule` can be only one of the following: ||
| `recurrenceRule` | ``object (`RecurrenceRule`)`` Optional. Recurrence rule describing the recurrence schedule for this task. |
|   ||
| Union field `_link`. `_link` can be only one of the following: ||
| `link` | `string` Output only. Web link to view the task in the Google Tasks web UI. |
|   ||
| Union field `_time_zone`. `_time_zone` can be only one of the following: ||
| `timeZone` | `string` Output only. The IANA time zone ID (e.g., `"America/New_York"`, `"UTC"`) of the task. |
|   ||
| Union field `_assignment_info`. `_assignment_info` can be only one of the following: ||
| `assignmentInfo` | ``object (`AssignmentInfo`)`` Output only. How the task is shared with others. Unset if the task is not shared. Changes to shared tasks are visible to other people. |
|   ||
| Union field `_parent_task_id`. `_parent_task_id` can be only one of the following: ||
| `parentTaskId` | `string` Output only. ID of the parent task if this task is a subtask. Unset for top-level tasks. Only returned by `list_tasks`. Unset if the task isn't shown in the task list, e.g. deleted tasks and completed tasks that are no longer shown. |
|   ||
| Union field `_position`. `_position` can be only one of the following: ||
| `position` | `integer` Output only. 0-based position of the task among its siblings in the user's custom order of the task list ("My order" in the Google Tasks apps): the task with position `0` is at the top. Siblings are the top-level tasks of the task list, or the subtasks of the same `parentTaskId`. Sort the siblings by `position` to get their order. Positions may have gaps for tasks that aren't returned, e.g. completed tasks or tasks on other pages. Only returned by `list_tasks`. Unset if the task isn't shown in the task list, e.g. deleted tasks and completed tasks that are no longer shown. |
|   ||

### RecurrenceRule

| JSON representation |
|---|
| ``` { "dailySchedule": { object (`DailySchedule`) }, "weeklySchedule": { object (`WeeklySchedule`) }, "monthlySchedule": { object (`MonthlySchedule`) }, "yearlySchedule": { object (`YearlySchedule`) }, "endDate": string, "countLimit": integer, "interval": integer } ``` |

| Fields ||
|---|---|
| Union field `schedule`. Specific schedule configuration. Exactly one schedule type must be set. `schedule` can be only one of the following: ||
| `dailySchedule` | ``object (`DailySchedule`)`` Daily schedule options. Set to an empty object (`{}`) to repeat the task every `interval` days. |
| `weeklySchedule` | ``object (`WeeklySchedule`)`` Weekly schedule options. |
| `monthlySchedule` | ``object (`MonthlySchedule`)`` Monthly schedule options. |
| `yearlySchedule` | ``object (`YearlySchedule`)`` Yearly schedule options. Set to an empty object (`{}`) to repeat the task every `interval` years on the month and day of its `scheduledDate`. |
|   ||
| Union field `end_condition`. Optional condition that specifies where the recurrence ends. `end_condition` can be only one of the following: ||
| `endDate` | `string` Optional. End date of the recurrence (YYYY-MM-DD). |
| `countLimit` | `integer` Optional. Number of occurrences before the recurrence ends. |
|   ||
| Union field `_interval`. `_interval` can be only one of the following: ||
| `interval` | `integer` Optional. Number of schedule units (days, weeks, months, or years) between occurrences. For example, 2 with `weeklySchedule` means every 2 weeks. Default is 1. |
|   ||

### WeeklySchedule

| JSON representation |
|---|
| ``` { "daysOfWeek": [ enum (`DayOfWeek`) ] } ``` |

| Fields ||
|---|---|
| `daysOfWeek[]` | ``enum (`DayOfWeek`)`` Required. Days of the week this task occurs on (e.g., `["MONDAY", "WEDNESDAY"]`, or `["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY"]` for weekdays only). Must not be empty. |

### MonthlySchedule

| JSON representation |
|---|
| ``` { "dayOfMonth": integer, "monthlyDayOfWeek": { object (`MonthlyDayOfWeek`) } } ``` |

| Fields ||
|---|---|
| Union field `monthly_type`. Monthly schedule specification. Exactly one monthly rule must be set. `monthly_type` can be only one of the following: ||
| `dayOfMonth` | `integer` Optional. Specific day of the month (1 to 31, or -1 for last day of month). |
| `monthlyDayOfWeek` | ``object (`MonthlyDayOfWeek`)`` Relative day of week in month (e.g. 3rd Tuesday). |
|   ||

### MonthlyDayOfWeek

| JSON representation |
|---|
| ``` { "weekNumber": integer, "dayOfWeek": enum (`DayOfWeek`) } ``` |

| Fields ||
|---|---|
| `weekNumber` | `integer` Required. Week of the month: 1 for 1st, 2 for 2nd, 3 for 3rd, 4 for 4th, -1 for last. |
| `dayOfWeek` | ``enum (`DayOfWeek`)`` Required. Day of week (e.g., `"TUESDAY"`). |

### Attachment

| JSON representation |
|---|
| ``` { "attachmentId": string, "driveAttachment": { object (`DriveAttachment`) } } ``` |

| Fields ||
|---|---|
| `attachmentId` | `string` Output only. Unique ID of the attachment on a task. Scoped to that task (the same resource attached to multiple tasks may have different IDs). Use this ID in `removedAttachmentIds` to remove the attachment. Ignored when adding attachments. |
| Union field `attachment`. The attached resource. `attachment` can be only one of the following: ||
| `driveAttachment` | ``object (`DriveAttachment`)`` A Google Drive file attached to the task. |
|   ||

### DriveAttachment

| JSON representation |
|---|
| ``` { "mimeType": string, "fileUrl": string } ``` |

| Fields ||
|---|---|
| `mimeType` | `string` Output only. MIME type of the attached file (e.g., `"application/vnd.google-apps.document"` or `"application/pdf"`). May be empty if unknown. Ignored when adding attachments. |
| Union field `_file_url`. `_file_url` can be only one of the following: ||
| `fileUrl` | `string` Required. The Google Drive URL of the attached file (docs.google.com or drive.google.com). Folders are not supported. |
|   ||

### AssignmentInfo

| JSON representation |
|---|
| ``` { "surfaceType": enum (`SurfaceType`) } ``` |

| Fields ||
|---|---|
| `surfaceType` | ``enum (`SurfaceType`)`` Output only. The surface the shared task originates from. |

### DayOfWeek

Represents a day of the week.

| Enums ||
|---|---|
| `DAY_OF_WEEK_UNSPECIFIED` | The day of the week is unspecified. |
| `MONDAY` | Monday |
| `TUESDAY` | Tuesday |
| `WEDNESDAY` | Wednesday |
| `THURSDAY` | Thursday |
| `FRIDAY` | Friday |
| `SATURDAY` | Saturday |
| `SUNDAY` | Sunday |

### SurfaceType

The surface the shared task originates from.

| Enums ||
|---|---|
| `SURFACE_TYPE_UNSPECIFIED` | Unspecified surface type. |
| `DOCUMENT` | The task was assigned from a document (e.g., Docs, Sheets, Slides). |
| `SPACE` | The task belongs to a Google Chat space. |

### Tool Annotations


[Tool annotations](https://modelcontextprotocol.io/specification/latest/schema#toolannotations) are sent to MCP clients to describe the basic risk of a given tool. Most clients treat these hints as untrusted, but they can be used to decide when a confirmation prompt might be sent to a user.


Along with the title string, the following boolean hints are defined as follows:

- `readOnlyHint`: If true, the tool doesn't modify its environment. Default: false.
- `destructiveHint`: If true, then the tool can perform destructive actions. If false, then the tool can only perform additive actions. Default: true.
- `idempotentHint`: If true, then calling the tool repeatedly with the same arguments will have no additional effect on its environment. Default: false.
- `openWorldHint`: If true, then the tool can interact with an 'open world' of external entities. If false, then the tool can only interact with internal entities. For example, a web search tool would be open world, while a memory tool would not be open world.

Destructive Hint: ❌ \| Idempotent Hint: ✅ \| Read Only Hint: ✅ \| Open World Hint: ❌

## Authorization Scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/tasks`
- `https://www.googleapis.com/auth/tasks.readonly`