Knowledge Documents

Create, update and attach the documents your AI assistants answer from

Ten tools let an agent manage the knowledge documents your AI assistants answer from, and decide which assistant uses which document.

Knowledge tools need a Pro or Enterprise plan, because MCP does. Every tool takes an optional orgId; leave it out unless your key acts on other organisations.

Knowledge Tools - 10

ToolScopeDoes
list_knowledge_documentsCONTENT_READLists documents, newest updated first. Filter by kind, statuses, enabled, assistantId, audienceKind, titleSource, descriptionSource, descriptionMissing or search (title prefix). No body in rows.
get_knowledge_documentCONTENT_READOne document with its full body. For a ready uploaded file, also extractedPreview, the text the AI can read.
list_ai_assistantsCONTENT_READActive assistants as { id, name, enabled } only. Use the ids to attach documents. Configuration is never returned.
create_knowledge_documentCONTENT_MANAGECreates an authored document. Expensive.
create_knowledge_documents_from_mediaCONTENT_MANAGECreates documents from files you already uploaded. Expensive.
update_knowledge_documentCONTENT_MANAGEChanges only the fields you pass. Expensive.
reindex_knowledge_documentCONTENT_MANAGERuns indexing again, for example after FAILED. Expensive.
delete_knowledge_documentCONTENT_MANAGEIrreversible. Deletes the document and its indexed passages.
attach_knowledge_documentsCONTENT_MANAGEAttaches up to 100 documents to an assistant. Returns the updated documents.
detach_knowledge_documentsCONTENT_MANAGEDetaches up to 100 documents from an assistant. Returns the updated documents.

Listing

list_knowledge_documents is cursor-paginated. Pass nextCursor back as cursor. limit is 1–100, default 20, and the first page carries totalCount. A cursor fixes the sort of its walk, so change sortField and sortDirection only on a new walk.

ValueOptions
kindAUTHORED, UPLOADED
statusesUp to 5 of INDEXING, READY, NO_TEXT, FAILED, PENDING_PLAN
titleSource, descriptionSourceAUTO (written by AI), USER
sortFieldUPDATED_AT (default), CREATED_AT, TITLE, STATUS
audienceKindEVERYONE, SIGNED_IN, FIELD_VALUES

search matches the start of a title, up to 100 characters.

Creating Documents

create_knowledge_document writes an authored document. Indexing runs in the background, so the status moves from INDEXING to READY.

ArgumentRequiredDescription
titleYesUp to 200 characters.
bodyYesUp to 100,000 characters. A template error, such as an unclosed tag, is rejected with its position.
descriptionNoUp to 300 characters.
assistantIdsNoAssistants that use it. Omit it and none are attached yet.
enabledNoWhether the AI may use it.
audienceNoWho it is used for. Default EVERYONE.

create_knowledge_documents_from_media takes mediaIds (1–20 per call) of files you uploaded earlier with createMedia or uploadMultipleMedia, using a key that has CONTENT_MANAGE. It returns one result per id, in order: a document, or an error.code of MEDIA_NOT_FOUND, UNSUPPORTED_TYPE or INVALID_INPUT. AI writes the title and description unless you set them with update_knowledge_document.

Audience

audience limits who the AI uses a document for.

kindMeaning
EVERYONEEvery visitor. The default.
SIGNED_INSigned-in visitors only.
FIELD_VALUESSigned-in visitors whose verified field value is in a list. Needs fieldKey and values (1–20 values, up to 100 characters each).

Updating

update_knowledge_document changes only the fields you pass. description: null clears the description, and audience: null resets it to everyone. Changing body, title, enabled, audience or assistantIds indexes the document again.

delete_knowledge_document cannot be undone. An unknown id and another organisation's id both answer not found.

Was this page helpful?

  • Knowledge Documents - what documents are and how assistants use them.
  • MCP Server - the scope table, errors and limits.
  • Content - Help and News over GraphQL, which MCP does not cover.

On this page