wiki_request_attachment_upload
Step 1 of uploading an image/file to a wiki page. Returns { attachmentId, uploadUrl, storageKey }. AFTER calling this you MUST: (2) PUT the raw file bytes to uploadUrl with your OWN HTTP client — the MCP server cannot do this binary upload — sending the EXACT same Content-Type as contentType and a Content-Length equal to sizeBytes (both are baked into the presigned URL; a mismatch 403s); then (3) call wiki_confirm_attachment to activate it. To embed the result as an image, add a TipTap image node with no src — { type:"image", attrs:{ attachmentId, pageId, width, height, align } }, width <= ~660 and height proportional — via wiki_update_page (content payload). Do NOT embed base64 data: URIs; they render distorted. Max 25 MB; system-executable file types are rejected. pageId is the page UUID (wiki_get_space_with_pages tree node id). API-key scope: wiki:attachments:write.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pageId | Yes | Page UUID (tree node `id` from wiki_get_space_with_pages) | |
| account | No | Multi-account auth only: name of the account from X-Dutify-Accounts to use for this call. Ignored in single-account mode (X-API-Key header). When multiple accounts are configured and this is omitted, the call fails with ACCOUNT_REQUIRED listing the available names. list_accounts never requires a selection. | |
| filename | Yes | Original filename, e.g. "diagram.png" | |
| sizeBytes | Yes | Exact file size in bytes — must match the PUT Content-Length exactly | |
| workspace | No | Workspace identifier or exact name for this call. Overrides the configured workspace. For personal keys, discover candidates with list_workspaces and select explicitly. Does not change other calls or expand a workspace key's access. | |
| contentType | Yes | MIME type, e.g. "image/png" — must match the PUT Content-Type exactly |