TOOL API
aitable_ _ prepare_ attachment_ upload
Requests a capacity-checked OSS direct-upload URL for a single attachment-field file. Use it only when you need to upload a local file before writing it into an attachment field; it is not a general-purpose upload endpoint and does not apply to later import-type tasks. If you already have a downloadable online file URL, skip this tool and pass [{"url":"https://..."}] directly in the attachment field of create_records / update_records so the server fetches and stores it as an internal attachment. This tool only prepares the upload and does not accept file bytes; the client must PUT the actual file content to the returned uploadUrl outside of MCP.
Call information
- Tool slug
- dingtalk.aitable__prepare_attachment_upload
- Provider
- DingTalk
- Average response
- 0 ms
- Calls in 7 days
- 0
Input parameters
baseIdrequiredBase ID,可通过 list_bases 或 search_bases 获取
fileNamerequired待写入 attachment 字段的文件名,必须包含扩展名(如 report.xlsx、photo.png)。服务端会基于扩展名和 mimeType 推断资源类型。
mimeType可选,文件 MIME type(如 application/pdf、image/png)。不传时服务端会根据 fileName 扩展名推断。若传入该值,则上传文件到 uploadUrl 时,PUT 请求必须携带 Content-Type header,且其值必须与这里完全一致。该字段只影响附件资源识别,不会把该工具升级为通用上传接口。
sizerequired文件大小(字节),必须大于 0。prepare 阶段会用它向下游申请带容量校验的 attachment 上传地址。