Skip to main content
Glama

upload_local_folder

Destructive

Upload all files from a local directory (non-recursive) to a Google Drive folder, with options to skip existing or system files and convert supported formats to Google Workspace files.

Instructions

Upload all files in a local directory (non-recursive) to a Google Drive folder. Not available when the server runs with LOCAL_FILE_ACCESS=off.

Args: local_path: Absolute path to the local directory. parent_folder_id: ID of the destination Drive folder. skip_if_exists: Skip files that already exist in the destination (default True). skip_system_files: Skip OS metadata files like .DS_Store (default True). convert: If True, request Drive's native import conversion for every file — same mapping as upload_local_file's convert param: .csv/.xlsx -> Google Sheets, .docx/.md/.html/.htm -> Google Docs, .pptx -> Google Slides. A file whose extension isn't in that mapping is reported in 'failed' rather than uploaded as-is, matching upload_local_file's own convert=True behavior for an unsupported extension. Default False (upload every file preserving its original format). A .md file is rendered by Drive's Markdown importer, not this server's converter: '-' bullets at every level, fenced code in a gray monospace box with a language label ('None' when it has no recognized language), at the page margin even inside a list item, quotes without a border, nested numbering '1.' rather than 'a.'. Full list: docs/known-limitations.md. Leading YAML front matter is left out of the Doc.

Returns: Summary with lists of 'uploaded', 'skipped', 'skipped_unverified', and 'failed'. 'uploaded'/'skipped' are filenames. 'skipped' also lists any '.gee-sweet-partial-*' temp file an interrupted download left in the folder; those are never uploaded. 'skipped_unverified' (only ever populated under convert=True) holds {name, matched_name, reason} entries for files skipped because an existing file in the target format is named after the local file's extension-stripped stem (Drive strips the extension on some conversions, e.g. 'report.csv' -> 'report') but carries no marker proving this tool created it from that file — it may be an earlier conversion predating the marker, or an unrelated file sharing the name. Nothing was uploaded for these; pass skip_if_exists=False to upload one anyway (upload_local_file applies the same check). Each 'failed' entry is {name, error} plus a 'fileId' in the narrow convert=True case where the file was actually created in Drive but a follow-up metadata call then failed (#420) — see upload_local_file's own Returns docs.

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": {
      "local_path": "<local_path>",
      "parent_folder_id": "<parent_folder_id>"
    },
    "name": "upload_local_folder"
  }
}

Input Schema

NameRequiredDescriptionDefault
convertNo
local_pathYes
skip_if_existsNo
parent_folder_idYes
skip_system_filesNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.6

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the destructiveHint=true annotation: discloses the auth constraint (OAuth/ADC required, service accounts cannot upload to personal Drive, Shared Drives work regardless), temp-file skipping for '.gee-sweet-partial-*', the marker-based verification logic behind 'skipped_unverified', and the edge case where a file is created but a follow-up metadata call fails (#420). That is unusually rich disclosure for a mutation tool.

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

Conciseness3/5

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

The purpose is correctly front-loaded in the first sentence, but the convert paragraph balloons into Markdown-importer rendering minutiae ('gray monospace box with a language label', bullet indentation, YAML front matter) that is irrelevant to selecting or invoking the tool and is already pointed at via docs/known-limitations.md. Substantial trimming would lose no decision-relevant information.

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?

For a 5-parameter mutation tool with an output schema, the definition covers selection scope, availability, auth prerequisites, default behavior, and every non-obvious return category ('uploaded', 'skipped', 'skipped_unverified', 'failed' with fileId). Nothing an agent needs before calling or interpreting the result is missing.

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 carry all five parameters, and it does: local_path (absolute path to a directory), parent_folder_id (destination folder), skip_if_exists and skip_system_files with defaults, and convert with the full extension-to-Google-type mapping and the failure mode for unmapped extensions. No parameter meaning is left to inference.

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 with explicit scope: 'Upload all files in a local directory (non-recursive) to a Google Drive folder.' The '(non-recursive)' qualifier and the LOCAL_FILE_ACCESS=off availability gate let an agent distinguish this from the single-file sibling upload_local_file without opening the schema.

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 clear operating context (non-recursive, unavailable with LOCAL_FILE_ACCESS=off) and a concrete branch instruction: pass skip_if_exists=False to upload a file flagged in 'skipped_unverified'. It references upload_local_file's matching convert behavior, but never explicitly states the selection rule ('use upload_local_file for one file, this for a directory').

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