Skip to main content
Glama

upload_file

Destructive

Upload text content as a Google Drive file, optionally converting Markdown or HTML into a formatted Google Doc in a chosen folder.

Instructions

Upload a text file to Google Drive, optionally converting it to a Google Doc.

Args: name: File name (include extension, e.g. 'notes.md', 'report.html'). content: Text content to upload. source_format: How to interpret the content. One of: 'markdown' — Markdown text. Uploaded as an HTML file, or with convert_to_doc=True written into a new Doc (see convert_to_doc). 'html' — Raw HTML. 'text' — Plain text (default). folder_id: Destination folder ID. Defaults to the configured folder or Drive root. convert_to_doc: If True, create a Google Doc instead of a raw file. A 'markdown' source is written with the same converter as create_doc(content_format='markdown'), so it renders the same way, images included (a local path, drive:<file_id> or public http(s) URL, embedded as create_doc does; bare URLs are linked). An 'html' source keeps its heading, list, and link formatting via Drive's HTML import. 'text' uploads as plain text and Drive converts it (no formatting preserved). auto_downscale: For a 'markdown' source with convert_to_doc=True, resize a local-path/drive: image over Google Docs' inline-image limit instead of failing it (default False), as create_doc's auto_downscale does: a drive: source gets a new " (resized)" copy beside the original, a local-path source uploads the resized bytes. No effect otherwise.

Returns: fileId, name, parent folder ID, and webViewLink of the created file. A Markdown Doc also gets create_doc's "images" (per-image outcomes) and "dropped_links" (links written as plain text) when there are any. If writing a Markdown Doc's content fails after the Doc was created, returns {"error", "fileId"} plus those fields instead.

Note: Requires OAuth or ADC auth. Service accounts cannot upload files to personal Drive (no storage quota). Works on Shared Drives regardless of auth method. Check server://auth-status for your current auth method.

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": {
      "name": "<name>",
      "content": "<content>"
    },
    "name": "upload_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
contentYes
folder_idNo
source_formatNotext
auto_downscaleNo
convert_to_docNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

With only destructiveHint=true supplied, the description carries real weight and does: OAuth/ADC requirement, the service-account quota limitation, the fact that a resized drive: image produces a new ' (resized)' copy beside the original, and a documented partial-failure return shape with fileId for recovery. That is well beyond what the annotation declares.

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

Conciseness4/5

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

Front-loaded summary, then clearly labeled Args/Returns/Note sections with no filler sentences. The markdown/convert_to_doc explanation is dense and somewhat nested, but each clause carries 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.

Completeness5/5

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

Covers the full picture for a six-parameter mutation tool: inputs, the conversion matrix, auth constraints, and even the error return shape. With an output schema present the Returns section is partly redundant but adds the Markdown-specific 'images' and 'dropped_links' details an agent would act on.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must supply all meaning, and it does for all six parameters: name with extension examples, content, source_format with three enumerated values and their downstream effects, folder_id defaulting behavior, convert_to_doc, and auto_downscale's conditional semantics.

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

Purpose4/5

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

A specific verb plus resource ('Upload a text file to Google Drive, optionally converting it to a Google Doc') that makes the text-content input, and hence the distinction from a local-file upload path, evident. It never names a sibling tool, though, so the agent must infer that upload_local_file exists for on-disk paths.

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 decision guidance inside each parameter: when to pick markdown vs html vs text, when convert_to_doc=True is worth it per source format, and exactly when auto_downscale applies and when it has 'no effect otherwise'. It stops short of stating when to use a different tool entirely (e.g. create_doc or upload_local_file).

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

Deploy Server

Other Tools