Upload a file to a page
upload_attachmentUploads a local file to an editable wiki page, then returns a token to paste where the attachment should appear before saving.
Instructions
Upload a local file (absolute path on the machine running this server) to a page you can edit. Returns the token : paste it where the file should show in the body, then save with update_page. The server decides which file types and sizes it takes and says so when it refuses one.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"page_id": "<page_id>",
"path": "<path>"
},
"name": "upload_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path of a local file (also ~/… or file://). | |
| page_id | Yes | Sophia page id (uuid), from get_page_tree, search_pages or recent_pages. |