Skip to main content
Glama

Upload File

upload_file

Upload a binary file (xlsx, pdf, docx, png, etc.) to Drive from base64-encoded content. Use this when you have file bytes from the conversation (e.g. an attached spreadsheet) and need to put them in the user's Drive. Set convert=true to have Drive convert Office formats to native Google formats during upload. Maximum 20MB decoded.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesFilename including extension (e.g. 'workout-plan.xlsx')
accountNoWhich connected Google account to create in, by its address, when the user has more than one — see get_status connections. Omit for the primary account.
convertNoIf true and the source is convertible (.xlsx → Sheets .docx → Docs .pptx → Slides .pdf/.csv → matching native), Drive converts during upload. If false (default) the file is stored as-is.
mime_typeYesThe source file's MIME type. Examples: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' for .xlsx 'application/pdf' for .pdf 'image/png' for .png
content_base64YesThe file bytes encoded as base64. Maximum decoded size 20MB.
parent_folder_idNoOptional folder ID to upload into. Defaults to the user's default folder if one is set.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
urlYes
accountNothe Google account the file was created in; present only when more than one is connected

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / account
      Added value: +{
      +  "description": "Which connected Google account to create in, by its address, when the user has more than one — see get_status connections. Omit for the primary account.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / account
      Added value: +{
      +  "description": "the Google account the file was created in; present only when more than one is connected",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • removedOutput schema / additionalProperties
      Removed value: -false
  3. First observed

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, idempotentHint=false and destructiveHint=false, so the write, non-repeatable, non-destructive profile is covered. The description adds genuinely new behavioral facts the annotations do not carry: the 20MB decoded size ceiling and the effect of convert on stored format.

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?

Three tight sentences, front-loaded with what is uploaded and where, followed by the selection condition and the size ceiling. No filler or repetition.

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?

With an output schema present, return values need no explanation, and the description covers format support, base64 input, conversion and the size limit. The only soft spot is that it does not mention auth/permission requirements for writing into the user's Drive.

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%, so all six parameters including account, convert, mime_type and content_base64 are already documented. The description restates the convert and 20MB constraints without adding syntax or format detail beyond the schema, which is the expected baseline.

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 binary file ... to Drive from base64-encoded content') and names the accepted formats and the source of the bytes. It is clearly distinguishable from siblings like convert_to_google_format or create_document.

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 usage trigger ('when you have file bytes from the conversation ... and need to put them in the user's Drive') plus the convert=true condition for Office formats. It stops short of naming alternatives such as access_file_by_url or convert_to_google_format for URL-sourced or post-upload conversion cases.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources