Skip to main content
Glama

attach_file

Attach a real file (image, PDF, audio, anything) to the brain, next to a note: it lands in the attachments/ folder of the note's branch and a Markdown reference is appended to the note (link=false to skip, then place the returned Markdown yourself). Give the file in ONE of three ways: data (base64, files up to ~3 MB), url (a public URL, fetched server-side, up to 25 MB), or neither: you get a signed PUT URL to upload the bytes yourself (e.g. with curl), then call attach_file again with the returned name and confirm=true. Returns the brain path and the Markdown that references it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoPublic http(s) URL to fetch
dataNoBase64 content (a data: URL prefix is fine)
linkNoAppend the reference to the note (default true when path is a note)
nameYesFile name with extension (accents and spaces are normalized)
pathYesThe note (…/nota.md) the file belongs to, or a folder
confirmNoSecond step of the direct upload: the bytes are on R2, register them
workspaceNoBrain to act on: its id, «mio» (yours), or the owner's name/email as shown by search. Usually OMIT it: a path that already lives in one brain is found there, for reads and writes alike. Pass it only when the tool tells you to (a NEW branch, or one that exists in several brains) — with the brain the user named; when they were not explicit ASK THEM. A brain where the branch does not exist is refused even if you name it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources