get_document_content
Retrieve a document's contents by document ID: returns plain text or JSON directly when size permits, and provides a pre-signed S3 URL for other formats or large downloads.
Instructions
Get document's contents
Retrieves the content of the document with the specified documentId.
If the content is plain text and under 6 MB, the content will be returned directly.
If the content is plain text but exceeds 6 MB, an error will be returned.
For documents not in plain text format, pre-signed S3 URLs will be returned to download the content from S3. It is recommended to use the
/documents/{documentId}/urlendpoint to retrieve pre-signed S3 URLs for downloading the content.
If the document has a Content-Type of text/, application/json, application/x-www-form-urlencoded the content field will be returned. All other Content-Type, the contentUrl field will be returned, which is a S3 Presigned url.
FormKiQ operation: GetDocumentContent. API group: core. Access: read.
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": {
"documentId": "<documentId>"
},
"name": "get_document_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| siteId | No | Site Identifier | |
| shareKey | No | Share Identifier | |
| accelerate | No | Use S3 Transfer Acceleration for presigned transfer URLs targeting the FormKiQ documents bucket, including internal uploads of inline content. Requires EnableS3TransferAcceleration=true on the deployment; additional transfer charges apply. Defaults to false. Has no effect on inline content returned by the API. Unavailable acceleration, external download URLs, and watermarked downloads return HTTP 400. | |
| artifactId | No | Artifact Document Identifier | |
| documentId | Yes | Document Identifier | |
| versionKey | No | Version Key (version key required URL encoding) |