Upload a document
upload_documentCreates a draft document from a PDF or a Word file (.docx) in the current Docflare workspace. The file comes from one the user attached in the chat (file), from a public https link (url), or, with neither, through a one-time upload link in the answer that takes the file as a multipart POST field named file, once, for 10 minutes; when sending the file there is blocked, or the user has no file in the chat, open_upload_pad lets them drop the file into the chat instead. Docflare checks the file the way a web upload is checked, and turns a Word file into a PDF. The answer is the new draft, the text already on its pages with ids, and its lines: the blank lines where a field can sit, each with an id, its page, its position as a share of the page width and height, and the text beside it. Who gets the draft is set with prepare_document, and fields go on with edit_document. With flow sign-document the user signs the document themselves: every field is theirs, and the people added with prepare_document get the signed copy.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "upload_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | A public https link that opens the PDF or Word file (.docx) itself. | |
| file | No | A PDF or Word file (.docx) the user attached in the chat, as the chat app passes it. | |
| flow | No | get-signature when other people sign the document, sign-document when the user signs it themselves and sends the signed copy. get-signature when left out; prepare_document can switch it later. | |
| name | No | The name of the new document. The file name when left out. |