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
| Tool | Scope | Does |
|---|---|---|
list_knowledge_documents | CONTENT_READ | Lists documents, newest updated first. Filter by kind, statuses, enabled, assistantId, audienceKind, titleSource, descriptionSource, descriptionMissing or search (title prefix). No body in rows. |
get_knowledge_document | CONTENT_READ | One document with its full body. For a ready uploaded file, also extractedPreview, the text the AI can read. |
list_ai_assistants | CONTENT_READ | Active assistants as { id, name, enabled } only. Use the ids to attach documents. Configuration is never returned. |
create_knowledge_document | CONTENT_MANAGE | Creates an authored document. Expensive. |
create_knowledge_documents_from_media | CONTENT_MANAGE | Creates documents from files you already uploaded. Expensive. |
update_knowledge_document | CONTENT_MANAGE | Changes only the fields you pass. Expensive. |
reindex_knowledge_document | CONTENT_MANAGE | Runs indexing again, for example after FAILED. Expensive. |
delete_knowledge_document | CONTENT_MANAGE | Irreversible. Deletes the document and its indexed passages. |
attach_knowledge_documents | CONTENT_MANAGE | Attaches up to 100 documents to an assistant. Returns the updated documents. |
detach_knowledge_documents | CONTENT_MANAGE | Detaches 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.
| Value | Options |
|---|---|
kind | AUTHORED, UPLOADED |
statuses | Up to 5 of INDEXING, READY, NO_TEXT, FAILED, PENDING_PLAN |
titleSource, descriptionSource | AUTO (written by AI), USER |
sortField | UPDATED_AT (default), CREATED_AT, TITLE, STATUS |
audienceKind | EVERYONE, 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.
| Argument | Required | Description |
|---|---|---|
title | Yes | Up to 200 characters. |
body | Yes | Up to 100,000 characters. A template error, such as an unclosed tag, is rejected with its position. |
description | No | Up to 300 characters. |
assistantIds | No | Assistants that use it. Omit it and none are attached yet. |
enabled | No | Whether the AI may use it. |
audience | No | Who 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.
kind | Meaning |
|---|---|
EVERYONE | Every visitor. The default. |
SIGNED_IN | Signed-in visitors only. |
FIELD_VALUES | Signed-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.
Related
- 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.