MCP Tools Reference: classroommcp.googleapis.com

Tool: update_course_work

Updates an existing coursework item in a course. Set courseWorkId plus only the fields to change; omitted fields keep their current values. Set dueDate, scheduleDate, topicId, or instructions to an empty string to clear it. Setting learningGoalIds replaces the current standards (skills are kept); use clearLearningStandards to remove all standards. assigneeIds and choices can be replaced but not cleared.

To change materials, don't resend the existing ones: use addMaterials to attach new materials and removeMaterialIds to remove specific ones, using the material IDs returned by get_course_work or create_course_work (call get_course_work first if you don't have them). All other attached materials are kept, including materials not returned by get_course_work (e.g. add-ons). clearMaterials removes only the materials that get_course_work returns (combine it with addMaterials to replace them); it can't be combined with removeMaterialIds. Coursework can have at most 20 materials. Drive files shared with shareMode COPY can't be added to or removed from published coursework.

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

Curl Request
curl --location 'https://classroommcp.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_course_work",
    "arguments": {
      // Provide these details according to the MCP tool specification.
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'

Input Schema

Request to update a coursework item. Only set the fields to change; unset fields keep their current values.

UpdateCourseWorkRequest

JSON representation
{
  "courseId": string,
  "courseWorkId": string,
  "choices": [
    string
  ],
  "assigneeIds": [
    string
  ],
  "learningGoalIds": [
    string
  ],
  "clearLearningStandards": boolean,
  "addMaterials": [
    {
      object (MaterialInput)
    }
  ],
  "removeMaterialIds": [
    string
  ],
  "clearMaterials": boolean,
  "timeZone": string,

  "title": string

  "instructions": string

  "topicId": string

  "maxPoints": number

  "scheduleDate": string

  "dueDate": string
}
Fields
courseId

string

Required. Identifier of the course.

courseWorkId

string

Required. Identifier of the course work item to update.

choices[]

string

Optional. New choices of a MULTIPLE_CHOICE_QUESTION. Replaces the existing choices. Leave empty to keep the current choices; they can't be cleared.

assigneeIds[]

string

Optional. Identifiers of the students to assign the course work to, from get_course_roster. Replaces the existing assignees. Leave empty to keep the current assignees; they can't be reset to all students.

learningGoalIds[]

string

Optional. Identifiers of the learning standards to tag the course work with (LearningGoal.id from search_course_standards, not standardCode). Replaces the existing learning standards; skills are not modified. Leave empty to keep the current standards; use clearLearningStandards to remove them. A course work item can have at most 10 learning goals (including skills).

clearLearningStandards

boolean

Optional. Whether to remove all learning standards. Can't be combined with learningGoalIds.

addMaterials[]

object (MaterialInput)

Optional. New materials to attach to the course work item. Existing materials are kept and must not be sent again. A course work item can have at most 20 materials.

removeMaterialIds[]

string

Optional. Identifiers of existing materials (Material.id, as returned by get_course_work or create_course_work) to remove from the course work item. Other existing materials are kept. If an ID doesn't match a material that get_course_work returns for the course work item, the request fails with NOT_FOUND and nothing is changed.

clearMaterials

boolean

Optional. Whether to remove all the materials that get_course_work returns for the course work item. Materials it doesn't return (e.g. add-ons) are kept. Can be combined with addMaterials to replace those materials, but not with removeMaterialIds.

timeZone

string

Required. The user's IANA timezone (e.g. "America/Los_Angeles"). Dates in this request are interpreted in it and dates in the response are formatted in it, matching what the user sees in Classroom.

title

string

Optional. New title. Must not be empty.

instructions

string

Optional. New instructions. An empty string clears them.

topicId

string

Optional. Identifier of the new topic, from list_topics. An empty string removes the course work from its topic.

maxPoints

number

Optional. New maximum points, as a non-negative whole number. Omit it to keep the current maximum points. Not supported for MATERIAL.

scheduleDate

string

Optional. New date to publish the course work automatically (YYYY-MM-DD). An empty string clears it.

dueDate

string

Optional. New due date (YYYY-MM-DD). An empty string clears it. Not supported for MATERIAL.

MaterialInput

JSON representation
{

  "driveFile": {
    object (DriveFileInput)
  },
  "youtubeVideoId": string,
  "linkUrl": string,
  "formUrl": string,
  "notebook": {
    object (GeminiNotebook)
  }
}
Fields
Union field content. The attachment content. content can be only one of the following:
driveFile

object (DriveFileInput)

Google Drive file to attach.

youtubeVideoId

string

Identifier of the YouTube video to attach (e.g. "dQw4w9WgXcQ").

linkUrl

string

URL of the web page to attach.

formUrl

string

URL of the Google Form to attach.

notebook

object (GeminiNotebook)

Gemini Notebook to attach.

DriveFileInput

JSON representation
{
  "id": string,
  "shareMode": enum (ShareMode)
}
Fields
id

string

Required. Identifier of the Drive file.

shareMode

enum (ShareMode)

Required. How students get the file: VIEW (read only), EDIT (everyone edits the same file), or COPY (each student gets their own copy).

GeminiNotebook

JSON representation
{
  "id": string,
  "title": string
}
Fields
id

string

Required. Identifier of the Notebook.

title

string

Title of the Notebook.

ShareMode

Sharing settings for the Drive file.

Enums
SHARE_MODE_UNSPECIFIED Unspecified sharing mode.
VIEW Students can view the shared file.
EDIT Students can edit the shared file.
COPY Students get a personal copy of the shared file.

Output Schema

Detailed metadata of a coursework item.

CourseWork

JSON representation
{
  "id": string,
  "courseWorkType": enum (Type),
  "choices": [
    string
  ],
  "assigneeIds": [
    string
  ],
  "materials": [
    {
      object (Material)
    }
  ],
  "publishDate": string,
  "state": enum (State),
  "learningGoals": [
    {
      object (LearningGoal)
    }
  ],

  "title": string

  "topicId": string

  "topicTitle": string

  "instructions": string

  "maxPoints": number

  "scheduleDate": string

  "dueDate": string
}
Fields
id

string

Identifier. Identifier for the course work.

courseWorkType

enum (Type)

Type of course work.

choices[]

string

Answer choices. Only set for MULTIPLE_CHOICE_QUESTION.

assigneeIds[]

string

List of student IDs this work is assigned to (unset means all students).

materials[]

object (Material)

Materials attached to this coursework item.

publishDate

string

Output only. Date the course work was published (YYYY-MM-DD).

state

enum (State)

Output only. State of the course work item.

learningGoals[]

object (LearningGoal)

Learning goals attached to this coursework item.

title

string

Title of the course work.

topicId

string

Identifier of the topic this course work belongs to (if any).

topicTitle

string

Output only. Title of the topic this course work belongs to. Only returned by get_course_work, and omitted if it couldn't be looked up.

instructions

string

Instructions for the coursework.

maxPoints

number

Maximum points achievable for this work, as a non-negative whole number. Not allowed for MATERIAL.

scheduleDate

string

Date the course work is scheduled to be published (YYYY-MM-DD). Time defaults to 8am in the user's timezone and is editable in the UI.

dueDate

string

Due date of the course work (YYYY-MM-DD). Time defaults to 11:59pm and is editable in the UI. Not allowed for MATERIAL.

Material

JSON representation
{
  "id": string,

  "sharedDriveFile": {
    object (SharedDriveFile)
  },
  "youtubeVideo": {
    object (YouTubeVideo)
  },
  "link": {
    object (Link)
  },
  "form": {
    object (Form)
  },
  "notebook": {
    object (GeminiNotebook)
  }
}
Fields
id

string

Output only. Identifier of the material. Use it to remove the material with UpdateCourseWorkRequest.removeMaterialIds.

Union field content. The attachment content. content can be only one of the following:
sharedDriveFile

object (SharedDriveFile)

Google Drive file attachment.

youtubeVideo

object (YouTubeVideo)

YouTube video attachment.

link

object (Link)

URL link attachment.

form

object (Form)

Google Forms attachment.

notebook

object (GeminiNotebook)

Gemini Notebook attachment.

SharedDriveFile

JSON representation
{
  "file": {
    object (DriveFile)
  },
  "shareMode": enum (ShareMode)
}
Fields
file

object (DriveFile)

Drive file details.

shareMode

enum (ShareMode)

Required. How students get the file: VIEW (read only), EDIT (everyone edits the same file), or COPY (each student gets their own copy).

DriveFile

JSON representation
{
  "id": string,
  "title": string,
  "url": string
}
Fields
id

string

Required. Identifier of the Drive file.

title

string

Output only. Title of the Drive file.

url

string

Output only. URL of the Drive file.

YouTubeVideo

JSON representation
{
  "id": string,
  "title": string
}
Fields
id

string

Required. YouTube video ID.

title

string

Output only. Title of the YouTube video.

JSON representation
{
  "url": string,
  "title": string
}
Fields
url

string

Required. URL of the link.

title

string

Output only. Title of the link.

Form

JSON representation
{
  "formUrl": string,
  "title": string,
  "responseUrl": string
}
Fields
formUrl

string

Required. URL of the form.

title

string

Output only. Title of the form.

responseUrl

string

Output only. URL of the form response. Only set if responses have been recorded and only when the requesting user is an editor of the form.

GeminiNotebook

JSON representation
{
  "id": string,
  "title": string
}
Fields
id

string

Required. Identifier of the Notebook.

title

string

Title of the Notebook.

LearningGoal

JSON representation
{
  "id": string,
  "type": enum (Type),
  "standardCode": string,
  "title": string,
  "documentTitle": string
}
Fields
id

string

Output only. ID of the learning goal. To attach a standard, use an id from search_course_standards (not standardCode).

type

enum (Type)

Output only. The type of learning goal.

standardCode

string

Output only. Standard code (e.g. "NY-2.NBT.4"). Only populated for standards.

title

string

Output only. Statement description for standards, or human-readable title for skills.

documentTitle

string

Output only. Curriculum document name. Only populated for standards.

Type

Type of course work.

Enums
TYPE_UNSPECIFIED Unspecified type.
ASSIGNMENT Standard coursework assignment.
SHORT_ANSWER_QUESTION Short answer question coursework.
MULTIPLE_CHOICE_QUESTION Multiple choice question coursework.
MATERIAL Material coursework.

ShareMode

Sharing settings for the Drive file.

Enums
SHARE_MODE_UNSPECIFIED Unspecified sharing mode.
VIEW Students can view the shared file.
EDIT Students can edit the shared file.
COPY Students get a personal copy of the shared file.

State

States of a course work item.

Enums
STATE_UNSPECIFIED Unspecified state.
PUBLISHED Course work is published and visible to students.
DRAFT Course work is a draft.

Type

The type of learning goal.

Enums
TYPE_UNSPECIFIED Unspecified learning goal type.
STANDARD A learning standard from an academic curriculum.
SKILL A skill representing an educational concept or competency. Only a teacher can add or remove skills, in Classroom.

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/classroom.coursework.students