When to use
Use these tools to prepare a corpus, grant retrieval access, or inspect all its chunks. Use import to add material and query for relevant excerpts. Enumeration and emptying are owner management actions, not semantic search.Create
crystal_create_knowledge_base takes required name and optional description, scope, sourceType, sourceRole, agentId, agentIds, channel, and peerScopePolicy (strict or permissive). Use an explicit agentIds array to define access.
The returned knowledgeBaseId identifies the new base. An empty allow-list closes access; configure it before querying.
Access
crystal_set_knowledge_base_access accepts knowledgeBaseId or exact knowledgeBaseName and an action:
These settings affect within-account retrieval. They are not a separate-account security boundary.
Enumerate and empty
Pass
limit: 100 explicitly: the current HTTP enumeration handler treats an omitted limit as 1. Follow continueCursor until isDone is true. Query results are not a substitute for enumeration.
Emptying is destructive; obtain explicit user approval first. It returns knowledgeBaseId, deletedMemories, activeDeletedMemories, and kept: true. An interrupted operation can have already deleted some chunks.
Archive, restore, and delete
There is no dedicated MCP archive/restore/delete-KB tool. Use the HTTP lifecycle endpoints or dashboard. The compatibility HTTP DELETE deactivates the KB and archives a bounded chunk set; it is not permanent deletion. PATCH withisActive: true reactivates the KB row but does not automatically restore archived chunks. The asynchronous lifecycle archive and delete operations are distinct; permanent deletion removes data and is not a restore path. Emptying retains the base’s settings so you can reimport into the same ID.
Examples
Examples use placeholder IDs. Replace them with IDs returned by your account. MCP examples show the JSON tool arguments and the JSON inside the tool result, not the outer MCP envelope.Create a closed corpus
Request:Grant access to an identity
Callcrystal_set_knowledge_base_access:
Enumerate chunks
Request:Empty a corpus after approval
Request:Practical sequence
Create the base, configure access, import chunks, and query with the intended identity. Keep the returned ID for updates. To refresh a source, prefer stable-key imports; empty the whole base only when you intend to remove all its chunks. For paged enumeration, sendcontinueCursor as cursor on the next request, preserving the base ID and limit. Stop when isDone is true, even if a cursor is present.