Gmail connector can't attach local files without sending base64 through the tool call
Summary
create_draft supports attachments, but only as inline base64 in attachments[].content. Claude Code can already read my local files — it just has no way to hand one to the connector. No path, no file handle, no runtime file reference.
So attaching a 525 KB PDF and a 240 KB XLSX means pushing about 1 MB of base64 through the tool call to move 765 KB of files. Fine for something tiny, but it becomes impractical quickly — and the files I want to attach are usually ones Claude Code just generated.
Repro
- Claude Code desktop, Code tab, Gmail connector enabled.
- Put
report.pdfanddata.xlsxin the workspace. - Ask Claude to draft an email and attach both files.
create_draftwants each attachment as inline base64. There's no way to just point it at the local file.
Expected
Something like either:
attachments: [{ file_ref: "..." }]
or:
attachments: [{ path: "/workspace/report.pdf" }]
Claude Code reads the file locally and handles the upload/encoding itself, instead of putting the whole file in the tool-call payload.
Actual
Inline base64 is the only option.
The Chrome extension's file_upload works around it, but only if you have the extension. The connector itself still can't take a file that Claude Code already has.
Related
anthropics/claude-ai-mcp#819— Gmail exposes attachment IDs, but there's no tool to download the attachment content.#83571—create_draftaccepts base64 attachments even though the tool description says attachments aren't supported.#28575— earlier request for Gmail draft attachment support.#76717— earlier report about missing attachment downloads; closed as unrelated to Claude Code.
Environment
- Claude Code desktop app, Code tab
- Windows 11
- First-party Gmail connector
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗