File Tools
AnyDB MCP can download files, upload small inline payloads, or transfer files of any size through a signed URL.
Available tools
| Tool | What it does |
|---|---|
download_file | Returns a temporary download or preview URL for a file cell. |
upload_file | Fallback upload for clients that cannot send an HTTP PUT; accepts base64 or UTF-8 content inline. |
prepare_file_upload | Creates a child File record and returns a signed PUT URL. |
complete_file_upload | Finalizes a signed-URL upload after the bytes have been transferred. |
Download a file
- Use
get_recordto identify the file cell and itscellpos. - Call
download_filewith the team, workspace, record, and cell position. - Open or fetch the returned URL immediately.
Normal download URLs expire after approximately 60 seconds. Request a new URL instead of caching an expired one. Set preview when the client should display the file inline.
Upload with a signed URL
This is the preferred upload flow for files of any size:
- Call
prepare_file_uploadwith the filename, exact byte size, team, workspace, and parent record. - PUT the raw bytes to the returned URL using the returned
contentType. - Call
complete_file_uploadwith the File record ID returned by the prepare call, not the original parent record ID.
The bytes go directly to storage and do not pass through the model's context.
Upload inline
Use upload_file only when the MCP client cannot issue the signed-URL PUT request. Base64 is the default encoding; use contentEncoding: "utf8" for plain text.
Inline base64 increases payload size by approximately one-third. The client capability, rather than file size alone, should determine which upload flow to use.
Both upload methods create a separate child File record under the supplied parent. They do not overwrite content on the parent record.