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 |
|---|
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 ( |
| Fields | |
|---|---|
Union field
|
|
filter |
Optional. Structured filtering criteria to filter returned tasks. |
Union field
|
|
pageSize |
Optional. The maximum number of tasks to return. Defaults to 100. |
Union field
|
|
pageToken |
Optional. The |
TaskFilter
| JSON representation |
|---|
{ "taskListId": string, "state": enum ( |
| Fields | |
|---|---|
Union field
|
|
taskListId |
Optional. Filter tasks belonging to a specific task list. Use |
Union field
|
|
state |
Optional. Filter tasks by completion state. Defaults to |
Union field
|
|
timeFilter |
Optional. Filter tasks by one of their date properties falling into a time window. |
Union field
|
|
includeDeleted |
Optional. Whether to include deleted tasks. Deleted tasks are returned with |
TimeFilter
| JSON representation |
|---|
{
"property": enum ( |
| Fields | |
|---|---|
property |
Required. The task property the date window applies to. |
Union field
|
|
startDate |
Optional. Inclusive first day of the window (YYYY-MM-DD). Omit |
Union field
|
|
endDate |
Optional. Inclusive last day of the window (YYYY-MM-DD). Set |
Union field
|
|
timeZone |
Optional. The IANA time zone ID (e.g., |
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 ( |
| Fields | |
|---|---|
tasks[] |
List of tasks returned. |
nextPageToken |
The next page token for pagination. |
Task
| JSON representation |
|---|
{ "id": string, "lastModified": string, "attachments": [ { object ( |
| Fields | |
|---|---|
id |
Output only. Unique ID of the task. Task IDs are not interchangeable with those of the Google Tasks REST API. |
lastModified |
Output only. ISO 8601 last modified timestamp in UTC (e.g. |
attachments[] |
Output only. Attachments on the task. Currently, only Google Drive files are returned. |
Union field
|
|
taskListId |
Optional. ID of the task list that this task belongs to. |
Union field
|
|
title |
Optional. Title of the task. May contain URLs. Empty if the task has no title. |
Union field
|
|
description |
Optional. Description or notes for the task. May contain URLs. |
Union field
|
|
completed |
Optional. Whether the task is completed. |
Union field
|
|
deleted |
Optional. Whether the task is deleted. |
Union field
|
|
scheduledDate |
Optional. Scheduled date of the task (YYYY-MM-DD). |
Union field
|
|
scheduledTime |
Optional. Scheduled time of the task (HH:MM:SS) in ISO 8601 extended format. |
Union field
|
|
deadlineDate |
Optional. Deadline date of the task (YYYY-MM-DD). |
Union field
|
|
recurrenceRule |
Optional. Recurrence rule describing the recurrence schedule for this task. |
Union field
|
|
link |
Output only. Web link to view the task in the Google Tasks web UI. |
Union field
|
|
timeZone |
Output only. The IANA time zone ID (e.g., |
Union field
|
|
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
|
|
parentTaskId |
Output only. ID of the parent task if this task is a subtask. Unset for top-level tasks. Only returned by |
Union field
|
|
position |
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 |
RecurrenceRule
| JSON representation |
|---|
{ "dailySchedule": { object ( |
| Fields | |
|---|---|
Union field schedule. Specific schedule configuration. Exactly one schedule type must be set. schedule can be only one of the following: |
|
dailySchedule |
Daily schedule options. Set to an empty object ( |
weeklySchedule |
Weekly schedule options. |
monthlySchedule |
Monthly schedule options. |
yearlySchedule |
Yearly schedule options. Set to an empty object ( |
Union field end_condition. Optional condition that specifies where the recurrence ends. end_condition can be only one of the following: |
|
endDate |
Optional. End date of the recurrence (YYYY-MM-DD). |
countLimit |
Optional. Number of occurrences before the recurrence ends. |
Union field
|
|
interval |
Optional. Number of schedule units (days, weeks, months, or years) between occurrences. For example, 2 with |
WeeklySchedule
| JSON representation |
|---|
{
"daysOfWeek": [
enum ( |
| Fields | |
|---|---|
daysOfWeek[] |
Required. Days of the week this task occurs on (e.g., |
MonthlySchedule
| JSON representation |
|---|
{
"dayOfMonth": integer,
"monthlyDayOfWeek": {
object ( |
| 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 |
Optional. Specific day of the month (1 to 31, or -1 for last day of month). |
monthlyDayOfWeek |
Relative day of week in month (e.g. 3rd Tuesday). |
MonthlyDayOfWeek
| JSON representation |
|---|
{
"weekNumber": integer,
"dayOfWeek": enum ( |
| Fields | |
|---|---|
weekNumber |
Required. Week of the month: 1 for 1st, 2 for 2nd, 3 for 3rd, 4 for 4th, -1 for last. |
dayOfWeek |
Required. Day of week (e.g., |
Attachment
| JSON representation |
|---|
{
"attachmentId": string,
"driveAttachment": {
object ( |
| Fields | |
|---|---|
attachmentId |
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 |
Union field attachment. The attached resource. attachment can be only one of the following: |
|
driveAttachment |
A Google Drive file attached to the task. |
DriveAttachment
| JSON representation |
|---|
{ "mimeType": string, "fileUrl": string } |
| Fields | |
|---|---|
mimeType |
Output only. MIME type of the attached file (e.g., |
Union field
|
|
fileUrl |
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 ( |
| Fields | |
|---|---|
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 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/taskshttps://www.googleapis.com/auth/tasks.readonly