English
Documents and attachments
Use kaiten_content_read to search for documents, read their content or schema, and inspect or download attachments. Use kaiten_content_write to change documents or attach, rename and delete files. Pass the operation and its input as request.operation and request.args.
Documents
- Call
list_documentsorlist_document_groupsto get a page. Version 1 uses an offset, starts at 0 and returns an array. Choose version 2 for OpenSearch and repeat the same filters with the previouspositionasquery.start_position. An empty position ends the search. Document search previews usequery.include_search_previewwith version 2. - Use
scan_documentsorscan_document_groupsfor a bounded snapshot. The snapshot defaults to 100 items and is capped at 1,000. Whentruncatedis true, continue with the corresponding paged list. - Read the selected
uidwithget_documentorget_document_group. Create a document with its sort order and optional parent UID. To edit the contents, read the current version withget_document_schemaand submit the full ProseMirror tree asbody.datatoupdate_document. - For an explicit schema update, call
get_document_schemawithschema_version: "latest"or a concrete version. Use the returnedresult.version(for examplev28) asbody.schema_versionand send the completebody.datamatching that schema. Kaiten validates the whole tree and saves the version and content together. It accepts the current or a newer supported schema and rejects downgrades. Restore a revision through the ordinaryupdate_documentform withbackup_version. - Document and group archive operations use the corresponding Kaiten DELETE routes. They return an archived record. This catalog has no restore operation. Inspect a folder’s contents before archiving it.
- Changing document access or publishing metadata can change who can see the content. Confirm the destination group and intended audience before updating its parent or access settings.
See the document edit contract and document removal and group removal references.
Attachments
Call list_card_files with the numeric card ID to find the card UUID and its attachment IDs. Comment and property attachment IDs come from the corresponding parent records. Select the matching target on other attachment operations.
| Target | Arguments |
|---|---|
card | card_uid, and file_uid for an existing attachment. |
comment | card_uid, comment_uid, and file_uid for an existing attachment. |
property | card_uid, property_uid, and file_uid for an existing attachment. |
legacy_card | Numeric card_id and, for an existing attachment, numeric file_id. |
- Use
get_attachmentfor metadata. On restricted targets, setquery.redirect: truefor a temporary signed location. Setquery.download: trueto request attachment disposition. Both options leave the actual bytes unfetched. Keep temporary locations private. - Use
download_attachmentfor an embedded binary resource. The MCP server fetches storage without Kaiten credentials and enforces the decoded byte limit defined byKAITEN_MAX_FILE_BYTES. A metadata call may succeed for an attachment whose bytes exceed that limit. - Use
attach_fileto send canonical padded base64. Prefer restricted UUID routes. Legacy uploads are deprecated and can be disabled by the company. After an ambiguous timeout, check the target before retrying to avoid a duplicate. - Use
update_attachmentwith abodycontaining a new name, a cover flag or both. Legacy attachments support only the cover flag. Explicitfalseclears the cover flag; an omitted value leaves it unchanged. Usedelete_attachmentto remove a file from its parent.
Restricted files inherit parent authorization. See the Kaiten restricted file migration guide.
Migrating v2 calls
For argument details, see documents and files.
| v2 operations | Canonical call |
|---|---|
documents.retrieveListOfDocuments, documents.iterate, documents.retrieveDocument | list_documents, scan_documents, get_document, respectively. Keep the existing arguments. |
documentGroups.retrieveListOfDocumentGroups, documentGroups.iterate, documentGroups.retrieveDocumentGroup | list_document_groups, scan_document_groups, get_document_group, respectively. |
documentSchemas.getDocumentDataSchema | get_document_schema. |
| v2 create, update and remove for documents and groups | create_document, update_document, archive_document and the matching group operations. |
list_card_files | list_card_files. Keep the arguments and local paging response. |
| v2 attachment gets | get_attachment with the matching target. Move direct-card redirect and download into args.query. |
| v2 attachment downloads | download_attachment with the matching target. |
| v2 attachment uploads | attach_file with the matching target. |
| v2 attachment updates | update_attachment with the matching target. Move top-level name and card_cover into args.body, and include at least one change. |
| v2 attachment removal or detachment | delete_attachment with the matching target. |