/integrations:mcp-file-upload-base64-transport-limitfrom integrations
Why you cannot upload a real file (>~15 KB) through content-MCP tools that take base64 inline — Google Drive `create_file`, similar Notion/media MCPs — and what to do instead. Use when: (1) `create_file` (or any MCP upload) fails with "Request contains an invalid argument" on a .pptx/.pdf/.png/.zip; (2) an upload subagent loops for many minutes / hours retrying the same file; (3) you Read a base64 file to feed a tool and it truncates (e.g. "returned only the first 22,377 of 124,988 characters", 25K-token cap, one unbreakable line); (4) you're about to push a binary to Drive/Notion via an MCP and the file is more than ~11 KB; (5) you need to embed a deck/file in Notion (Notion MCP is URL/text-only — no binary upload). Also records that Office files (.pptx/.docx/.xlsx) DO auto-convert to native Google editor types on create_file by default.
Ships in integrations. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Content-oriented MCP upload tools (e.g. Google Drive create_file) accept file bytes
only as base64 passed inline in the tool call — there is no "upload from path"
input. That base64 must therefore pass through the model's context, and it hits two
independent hard limits that make uploading anything but tiny files impossible:
Request contains an invalid argument; a ~10 KB
pptx (~13.7K chars) succeeded.Net: create_file-style base64 upload is reliable only for files under ~11 KB
(~15K base64 chars). Real artifacts (decks, PDFs, images) are 50–150 KB+ and will
fail — often after an agent burns minutes-to-hours retrying.
.b64 file you meant to feed to a tool.notion-create-pages /
notion-update-page) is Notion-Markdown + URL-referenced media only — no binary
upload.Never route file bytes through the model. Use a disk-based transport the model only invokes (it never holds the bytes):
Google Drive (recommended): rclone. One-time rclone config (type drive,
scope full, browser OAuth). Then upload straight from disk, converting to a native
Google editor type on the way in:
rclone copy "deck.pptx" gdrive: \
--drive-root-folder-id <FOLDER_ID> \
--drive-import-formats pptx
Target a specific folder by id with --drive-root-folder-id. Add --drive-team-drive <id>
if the folder lives in a Shared Drive.
Share / get an embeddable URL (Drive MCP has no set-permission tool):
rclone link gdrive:<path> sets anyone-with-link AND returns the URL.
Into Notion: put the file somewhere with a public URL (e.g. the Google Slides from
above, or a static host), then embed the URL via notion-update-page — do not try to
upload the binary.
Keep the MCP create_file path only for genuinely tiny payloads (<~11 KB) or text
(textContent).
rclone upload returns the new object; confirm conversion via Drive MCP
get_file_metadata → mimeType == application/vnd.google-apps.presentation (or
.document / .spreadsheet).rclone link returns a https://… URL that renders when embedded.93 KB workshop deck (Measuring the AI-First Organization.pptx, ~125K base64 chars):
MCP create_file could not move it (Read truncated at 22K chars; inline emission
corrupted). rclone copy … --drive-import-formats pptx uploaded it from disk in one
shot and Drive converted it to a native Google Slides file; rclone link produced the
anyone-with-link URL embedded on the matching Notion page.
create_file schema listing only
text/plain→Doc and text/csv→Sheet as default conversions, that list is
non-exhaustive: uploading a .pptx with contentMimeType=application/vnd.openxmlformats-officedocument.presentationml.presentation
yields a native Google Slides file by default. Set disableConversionToGoogleType:true
only if you want to keep it as a raw Office file. (So the conversion was never the
problem — only the transport was.)search_files by title before uploading to avoid duplicates.If the user runs Google Drive for desktop, the simplest transport needs no rclone, no OAuth, no base64 — just a filesystem copy into the synced mount.
~/Library/CloudStorage/GoogleDrive-<email>/My Drive/.
Copying a file into any synced folder there uploads it on the next sync. Proven:
cp deck.pptx "…/My Drive/ai-sdlc/presentations/" appeared in Drive within seconds,
byte-identical.fileId. Re-copying an edited file over the same
path updates the existing Drive file in place — same fileId, new
modifiedTime/size — NOT a delete+recreate. This sidesteps the Drive MCP's lack of
a delete/trash tool AND lack of upsert. Confirmed by checking createdTime and
fileId unchanged after an overwrite. (Contrast the MCP create_file path, which
duplicates on re-run.)get_file_permissions, read-only), so a pre-shared folder is the easy path;
otherwise sharing needs the web UI / browser..pptx lands as a .pptx (Office
file), NOT native Google Slides. Drive-for-desktop never runs the "convert to Google
editor format" step — only web-UI upload with the convert setting, or an API import
with mimeType=application/vnd.google-apps.presentation, does. The Drive MCP
copy_file tool CANNOT convert either (it has no mimeType param). To get native
Slides you need a browser step (Open with Google Slides → Save as Google Slides) or
rclone --drive-import-formats..pptx in Drive that's link-shared embeds inside Notion via an
<embed src="https://drive.google.com/file/d/<ID>/preview"> block (Notion
enhanced-markdown embed). Verified it renders the actual slides inline (after a brief
load spinner). Notion has no bookmark block in its enhanced-markdown spec and no binary
upload — URL/embed only.What SKILL.md sets; muted values are Claude Code's defaults
7 skills in this plugin
/grafana-dashboard-datasource-uid-mismatchFix for Grafana dashboard panels silently showing "No data" even though
Prometheus (or any other datasource) has the data and the same query
works in Prometheus's own UI. Use when: (1) a freshly-imported or
provisioned Grafana dashboard shows "No data" on every panel; (2) the
metric exists in Prometheus's `/api/v1/query` response but doesn't
render in any Grafana panel; (3) you set up Grafana via Docker
provisioning (`provisioning/datasources/*.yml` +
`provisioning/dashboards/*.json`) and the dashboard doesn't bind to
the datasource; (4) bringing up a stack on a fresh `grafana_data`
volume causes the dashboard to break even though it worked before;
(5) Grafana logs show
`level=error msg="Failed to provision data sources" error="Datasource provisioning error: data source not found"`
after adding `uid:` to a datasource YAML and restarting. Root cause is
a datasource UID mismatch between the dashboard JSON's hardcoded
`"uid": "prometheus"` and the auto-generated UID Grafana gives an
unpinned datasource.
/notion-publish-generated-markdownGotchas when publishing AI/subagent-drafted Notion-flavored markdown via the
Notion MCP (notion-create-pages / notion-update-page) — especially design-phase
artifacts with callouts, <table> blocks, and mermaid diagrams. Use when:
(1) a published Notion page shows literal "<callout" / "<table" / "&"
instead of rendered blocks; (2) a subagent returns drafted markdown with HTML
entities escaped (< > &) that you are about to pass to
notion-create-pages; (3) a mermaid diagram silently fails to render and a
subgraph/node id is a reserved word such as `graph`, `end`, or `subgraph`;
(4) you fanned out drafters to publish pages and need to confirm the pages
actually landed.
Other plugins' skills for the same job
npx claudepluginhub cajias/claude-skills --plugin integrations