Tool: update_task
Updates an existing task. Note: To mark a task as completed or uncompleted, use complete_task or uncomplete_task instead. Limitation: An existing non-recurring task can't be made recurring. If the user asks for it, explain that this isn't supported and that they can make the task repeat in the Google Tasks app. Don't delete and re-create the task as a recurring task unless the user explicitly asks for that.
RULES FOR DEADLINES AND UPDATES:
- Deadlines vs Scheduled Dates: Use
deadlineDateONLY for 'by [date]', 'due', or 'deadline'. Default toscheduledDatefor 'for/on [date]'. - Updating Existing Dates: If a task only has one date type, update that existing field (if only a scheduled date exists, update
scheduledDateeven if asked as 'deadline'; if only a deadline exists, updatedeadlineDateeven if asked as 'schedule'). - Deadlines with Time: Deadlines only support dates. Always set
deadlineDate. If a time is specified for the deadline (e.g., 'due Friday at 5pm'), preserve it by settingscheduledDateandscheduledTimeto that time, unless a separate scheduled date/time was requested. If the deadline has no time, leave the scheduled fields unmodified. - Deadlines on Recurring Tasks: Google Tasks does not support deadlines on recurring tasks. When updating a recurring task, any requested deadline is omitted.
The following code sample shows how to use curl to call the update_task 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": "update_task", "arguments": { // Provide these details according to the MCP tool specification. } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Request to update a task. Omit any optional field to retain its current value.
UpdateTaskRequest
| JSON representation |
|---|
{ "taskId": string, "addedAttachments": [ { object ( |
| Fields | |
|---|---|
taskId |
Required. The ID of the task to update. |
addedAttachments[] |
Optional. Attachments to add to the task. Currently, only Google Drive files ( |
removedAttachmentIds[] |
Optional. IDs of attachments to remove from the task, as returned in |
Union field
|
|
updateSeries |
Optional. Whether to update the whole recurrence series of a recurring task instead of a single task instance. Defaults to |
Union field
|
|
title |
Optional. The new title of the task. Omit to retain current value, set to empty string |
Union field
|
|
description |
Optional. The new description of the task. Omit to retain current value, set to empty string |
Union field
|
|
scheduledDate |
Optional. The new scheduled date of the task (YYYY-MM-DD). Use this when the user specifies when to do the task ('reschedule for tomorrow', 'move to Friday'). Omit to retain current value, set to empty string |
Union field
|
|
scheduledTime |
Optional. The new scheduled time of the task (HH:MM:SS) in ISO 8601 extended format. Omit to retain current value, set to empty string |
Union field
|
|
deadlineDate |
Optional. The new deadline/due date of the task (YYYY-MM-DD). ONLY use |
Union field
|
|
recurrenceRule |
Optional. The new recurrence rule of a recurring task. Omit to keep the existing recurrence rule unmodified. Requires |
Union field
|
|
timeZone |
Optional. The IANA time zone ID (e.g., |
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. |
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 |
Output Schema
Represents a task.
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/tasks