Skip to main content
Glama

drive_upload_file

Upload a file to Google Drive and get its ID and URL ready for attaching to Classroom assignments. Supports local files or base64, with optional conversion to Google Docs, Sheets, or Slides.

Instructions

Upload a file to Google Drive and return its Drive ID and URL, ready to attach. Prefer localPath for a file on the teacher's computer (Downloads, Documents, Desktop or a cloud-drive folder; up to 100 MB). base64Content is for small generated files (up to 5 MiB).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "drive_upload_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoFile name in Drive (default: the local file name)
folderIdNoDrive folder to upload into (default: My Drive)
mimeTypeNoDefault: detected from the file extension
localPathNoAbsolute path (or ~/...) of a file on this computer
base64ContentNo
convertToGoogleFormatNoConvert Word/Excel/PowerPoint/OpenDocument/CSV files to Google Docs/Sheets/Slides so students can edit them online

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv3.1.0
    • addedInput schema / properties / convertToGoogleFormat
      Added value: +{
      +  "default": false,
      +  "description": "Convert Word/Excel/PowerPoint/OpenDocument/CSV files to Google Docs/Sheets/Slides so students can edit them online",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / folderId
      Added value: +{
      +  "description": "Drive folder to upload into (default: My Drive)",
      +  "minLength": 1,
      +  "pattern": "^[A-Za-z0-9_-]+$",
      +  "type": "string"
      +}
    • addedInput schema / properties / localPath
      Added value: +{
      +  "description": "Absolute path (or ~/...) of a file on this computer",
      +  "maxLength": 1024,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • removedInput schema / properties / mimeType / default
      Removed value: -"application/octet-stream"
    • addedInput schema / properties / mimeType / description
      Added value: +"Default: detected from the file extension"
    • addedInput schema / properties / name / description
      Added value: +"File name in Drive (default: the local file name)"
    • removedInput schema / required
      Removed value: -[
      -  "name",
      -  "base64Content"
      -]
  2. First observedv3.0.0-beta.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and openWorldHint=true, so the write nature and external reach are known. The description adds value beyond them by disclosing size ceilings (100 MB local, 5 MiB base64) and the return payload (Drive ID and URL), though it says nothing about duplicate-name handling, overwrite behavior, or permission/auth failures.

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 dense sentences with zero filler: the outcome is stated first, then the parameter-selection rule with its limits. Every clause carries operational information an agent would otherwise have to guess.

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 6-parameter, zero-required mutation tool with no output schema, the definition covers the essential points: return values, mode selection, and size limits. The remaining gap is mutation edge cases such as name collisions and target folder creation, which matter for reliable invocation but are secondary.

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 coverage is 83%, so the schema already documents name, folderId, mimeType, localPath, and convertToGoogleFormat. The description adds real decision value by pairing each upload mode with a size limit and by illustrating typical local path locations, but base64Content itself is left without a schema description and the description does not fill that gap beyond the size cap.

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 ("Upload a file to Google Drive") and adds the outcome ("return its Drive ID and URL, ready to attach"). No sibling tool in the catalog performs uploads, so the verb alone cleanly separates it from drive_search_files and the classroom_* tools.

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 concrete selection guidance between the two mutually exclusive input modes: prefer localPath for files already on the teacher's computer, base64Content for small generated files. It stops short of stating when not to use the tool or naming an alternative (e.g., for files over 100 MB), so it is strong context without explicit exclusions.

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