documentsDocuments

2 MCP tools.

Machine-readable: /reference/api/tools/documents.json

Tools

document_import_status read-only

Check the progress of a bulk document-import job by its ID, scoped to this organization. Returns status (queued/running/completed/completed_with_errors/failed/canceled), counts (total, succeeded, duplicates, failed, pending), percent complete, and — when include_errors is true — up to 50 failed files with their error messages. Use this after starting a batch import to know when it's done and what, if anything, failed.

category
documents (Documents)
permissions
documents.view

Parameters

job_id : string
UUID of the DocumentImportJob to check.
include_errors : boolean (optional)
Include up to 50 failed-file details (default: true). — default: true

document_upload

Ingest a file into this organization's document corpus so it becomes searchable. Supply a filename plus EITHER content_base64 (for binary files like PDFs, images, Office docs) OR content_text (for plain-text or markdown). The file is stored at its canonical key, a Document record is created, and — if this org's pipeline is enabled — text extraction, chunking, and embedding are queued automatically so the document shows up in document_search and document_semantic_search. Duplicate content (same SHA-256) is detected and the existing document is returned instead of creating a copy. Max 25 MB decoded. This is the only way to add documents to the corpus from inside the Studio; the corpus mount itself is read-only.

category
documents (Documents)
permissions
documents.add_document

Parameters

filename : string
Filename including extension (e.g. 'pump-manual.pdf'). Drives the file extension, MIME detection, and canonical storage key. Any directory components are stripped.
content_base64 : string (optional)
Base64-encoded file bytes. Use for binary files (PDF, images, docx/xlsx, zip). Provide exactly one of content_base64 or content_text.
content_text : string (optional)
UTF-8 text content. Convenience for plain-text or markdown documents. Provide exactly one of content_base64 or content_text.
title : string (optional)
Human-readable title (max 500 chars). Defaults to a title derived from the filename.
document_type : string (optional)
Taxonomy document type code (see document_taxonomy_describe). Defaults to 'other'. An invalid value falls back to 'other'.
description : string (optional)
Optional free-text description of the document.
tags : array (optional)
Optional list of string tags to attach.
is_confidential : boolean (optional)
Mark the document as requiring elevated access (default: false). — default: false