Skip to main content
Glama

Attach Drive file

add_drive_file_attachment

Attach 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

NameRequiredDescriptionDefault
fileYesDrive file id or any drive.google.com / docs.google.com link
itemYesPost/assignment id, or its classroom.google.com link
courseNoCourse id, link or name. Optional when `item` is a full Classroom link (the course is read from it)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Adds meaningful context beyond the annotations: it discloses that this is a non-submitting write and, importantly, warns that the request format was reverse-engineered from the web client and is unverified, advising the caller to check the result. That caveat is exactly the kind of behavioral risk an agent needs. It does not cover duplicate-attachment handling or permission requirements, keeping it below a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, front-loaded with the action and its boundary, followed by a high-value caveat. No filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a three-parameter write with full schema coverage and annotations declaring openWorldHint and non-destructiveness, this covers what the tool does, what it does not do, and the reliability risk of the call. Minor gaps (duplicate handling, whether the attachment appears immediately) keep it from a 5.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and each parameter (file, item, course) is documented in the schema itself, including link-or-id flexibility. The description adds no additional parameter meaning, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Attach an existing Google Drive file") plus scope ("to your work on an assignment") and immediately bounds it with "Does not turn it in." That final clause separates it from the turn_in sibling and the verb 'existing' hints at the distinction from upload_and_attach_file.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear condition for use — an already-existing Drive file being attached to assignment work — and explicitly excludes the submission step (turn_in). It stops short of naming the relevant alternatives (uploading a new file vs. adding a link), so the agent must infer those from sibling names.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.