Tool: complete_task
Marks a task as complete.
The following code sample shows how to use curl to call the complete_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": "complete_task", "arguments": { // Provide these details according to the MCP tool specification. } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Request to mark a task as complete.
CompleteTaskRequest
| JSON representation |
|---|
{ "taskId": string } |
| Fields | |
|---|---|
taskId |
Required. The ID of the task to complete. |
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