crystal_import_knowledge.
When to use
Use import for a reusable manual or other reference corpus split into meaningful chunks. Use remember for an individual personal fact, and query to check the imported material.
A repeated stable
dedupeKey replaces that chunk. Keyless chunks append; there is no automatic content-hash deduplication promise. Stdio can create a missing named KB. Hosted import only resolves an existing KB, so create it first.
The standard import loop inserts or updates each chunk, then awaits embedding and salience work before advancing. A thrown error can interrupt the import after earlier chunks were saved. Use stable keys for repeatable imports and inspect the result; do not assume every failure is skipped.
The response contains knowledgeBaseId, importedCount (new chunks), updatedCount (replacements), memoryIds, memoryCount, and totalChars. Direct HTTP uses POST /api/knowledge-bases/{id}/import and returns 201 on success.
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.Import a repeatable section
Request:Update that section
Request:Prepare and verify an import
- Create or select the intended KB and verify its access settings.
- Split the document into sections that make sense independently. Include source metadata when it helps identify the original text.
- Use a stable key for each section when you plan to refresh the material. Keep keys unique within the KB.
- Inspect imported and updated counts, then query a known passage with the intended identity.
Errors and common mistakes
Create the base first on hosted MCP. Do not sendkb_id or assume a title is required on every chunk. Use stable keys before retrying an interrupted import, since earlier chunks may already exist. Review content-screening or provider errors before retrying.