## Tool: `get_announcements`

> [!WARNING]
> **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features.

Retrieves the full text, attached materials, assignees, and state of one or more announcements in a course by ID. Use list_announcement_summaries to discover announcements and retrieve their IDs.

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

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

## Input Schema

Request to get announcement details.

### GetAnnouncementsRequest

| JSON representation |
|---|
| ``` { "courseId": string, "announcementIds": [ string ], "timeZone": string } ``` |

| Fields ||
|---|---|
| `courseId` | `string` Required. Identifier of the course. |
| `announcementIds[]` | `string` Required. Identifiers of the announcements. At most 50 IDs per request. |
| `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. |

## Output Schema

Response containing announcement details.

### GetAnnouncementsResponse

| JSON representation |
|---|
| ``` { "announcements": [ { object (`https://developers.google.com/workspace/classroom/reference/mcp/tools_list/get_announcements#Output.Schema.Announcement`) } ] } ``` |

| Fields ||
|---|---|
| `announcements[]` | ``object (`https://developers.google.com/workspace/classroom/reference/mcp/tools_list/get_announcements#Output.Schema.Announcement`)`` The list of retrieved announcements. |

### Announcement

| JSON representation |
|---|
| ``` { "id": string, "materials": [ { object (`https://developers.google.com/workspace/classroom/reference/mcp/tools_list/get_course_work#Output.Schema.Material`) } ], "assigneeIds": [ string ], "publishDate": string, "state": enum (`https://developers.google.com/workspace/classroom/reference/mcp/tools_list/get_announcements#Output.Schema.State`), "text": string "scheduleDate": string } ``` |

| Fields ||
|---|---|
| `id` | `string` Output only. Identifier. Announcement ID. |
| `materials[]` | ``object (`https://developers.google.com/workspace/classroom/reference/mcp/tools_list/get_course_work#Output.Schema.Material`)`` Materials attached to this announcement. |
| `assigneeIds[]` | `string` List of student IDs this announcement is visible to (unset means all students). |
| `publishDate` | `string` Output only. Date the announcement was published (YYYY-MM-DD). |
| `state` | ``enum (`https://developers.google.com/workspace/classroom/reference/mcp/tools_list/get_announcements#Output.Schema.State`)`` Output only. State of the announcement. |
| `text` | `string` Text of the announcement. |
| `scheduleDate` | `string` Date the announcement is scheduled to be published (YYYY-MM-DD). Time defaults to 8am in the user's timezone and is editable in the UI. |

### Material

| JSON representation |
|---|
| ``` { "id": string, "sharedDriveFile": { object (`https://developers.google.com/workspace/classroom/reference/mcp/tools_list/get_course_work#Output.Schema.SharedDriveFile`) }, "youtubeVideo": { object (`https://developers.google.com/workspace/classroom/reference/mcp/tools_list/get_course_work#Output.Schema.YouTubeVideo`) }, "link": { object (`https://developers.google.com/workspace/classroom/reference/mcp/tools_list/get_course_work#Output.Schema.Link`) }, "form": { object (`https://developers.google.com/workspace/classroom/reference/mcp/tools_list/get_course_work#Output.Schema.Form`) }, "notebook": { object (`https://developers.google.com/workspace/classroom/reference/mcp/tools_list/get_course_work#Output.Schema.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 (`https://developers.google.com/workspace/classroom/reference/mcp/tools_list/get_course_work#Output.Schema.SharedDriveFile`)`` Google Drive file attachment. |
| `youtubeVideo` | ``object (`https://developers.google.com/workspace/classroom/reference/mcp/tools_list/get_course_work#Output.Schema.YouTubeVideo`)`` YouTube video attachment. |
| `link` | ``object (`https://developers.google.com/workspace/classroom/reference/mcp/tools_list/get_course_work#Output.Schema.Link`)`` URL link attachment. |
| `form` | ``object (`https://developers.google.com/workspace/classroom/reference/mcp/tools_list/get_course_work#Output.Schema.Form`)`` Google Forms attachment. |
| `notebook` | ``object (`https://developers.google.com/workspace/classroom/reference/mcp/tools_list/get_course_work#Output.Schema.GeminiNotebook`)`` Gemini Notebook attachment. |

### SharedDriveFile

| JSON representation |
|---|
| ``` { "file": { object (`https://developers.google.com/workspace/classroom/reference/mcp/tools_list/get_course_work#Output.Schema.DriveFile`) }, "shareMode": enum (`https://developers.google.com/workspace/classroom/reference/mcp/tools_list/get_course_work#Output.Schema.ShareMode`) } ``` |

| Fields ||
|---|---|
| `file` | ``object (`https://developers.google.com/workspace/classroom/reference/mcp/tools_list/get_course_work#Output.Schema.DriveFile`)`` Drive file details. |
| `shareMode` | ``enum (`https://developers.google.com/workspace/classroom/reference/mcp/tools_list/get_course_work#Output.Schema.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. |

### Link

| 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. |

### 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 an announcement.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | Unspecified state. |
| `PUBLISHED` | Announcement is published and visible to students. |
| `DRAFT` | Announcement is a draft. |

### 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/classroom.announcements`
- `https://www.googleapis.com/auth/classroom.announcements.readonly`