Attach Drive file
add_drive_file_attachmentAttach an existing Google Drive file to Google Classroom assignment work without turning it in; use when the file is already in Drive and needs to be linked to an assignment.
Instructions
Attach an existing Google Drive file to your work on an assignment. Does not turn it in. NOTE: the request format for this write was derived from the Classroom web client's code and has not been verified against a live account; check the result.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"item": "<item>",
"file": "<file>"
},
"name": "add_drive_file_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Drive file id or any drive.google.com / docs.google.com link | |
| item | Yes | Post/assignment id, or its classroom.google.com link | |
| course | No | Course id, link or name. Optional when `item` is a full Classroom link (the course is read from it) |