Add a document to a site
add_documentOne file held on a site and read, as a file dropped on the site's page is: its text layer page by page, its summary and, for a laboratory table, its result rows, all kept in the account and searched by ask_site. Give the file as content_base64, or a text as text. The same bytes added twice are one document. The answer gives the document's id, its state (read, or refused with a code and why), its pages, and not_done: each step of the read not made in this call. At most 8 MiB a file here; a larger one goes on the site's page (up to 200 MiB).
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": {
"site": "<site>",
"filename": "<filename>"
},
"name": "add_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | Yes | The site: its id (from list_sites), or a part of its name that names one site only. | |
| text | No | The document as text, kept as a UTF-8 file under `filename`. Give this or `content_base64`. | |
| filename | Yes | The file's name with its extension (permit.pdf, results.xlsx, notes.txt): it says what kind of file it is. | |
| content_base64 | No | The file's bytes, base64. Give this or `text`. |