files_create
Create markdown, mermaid, or HTML knowledge-base files in batches up to 200 per call, each written to disk and indexed for full-text search.
Instructions
Create one or more markdown, mermaid, or HTML files in the knowledge base or project (up to 200 per call). Pass a single-element files array for the one-file case. This operation writes each file to disk and adds it to the local SQLite FTS5 index. Destination is 'knowledge' (global KB) or 'kontexta' (internal Kontexta schema file, project_id required). 'project' is REFUSED: nothing created through kxta is written into a project repo. If destination is 'knowledge', 'kind' is strictly required for md files, pick 'dictionary' (authoritative source-of-truth) or 'note' (informational snapshot); see the kind param for the rubric. No external auth required. Rate limits do not apply (local operation). Per-item failures are isolated to errors[], the rest of the batch still commits; a single-item call still reports its failure the same way. Returns {created_count, error_count, created, errors}. If a destination directory does not exist, it will be created automatically. To modify an existing file, use 'files_update' instead. Pass format='mmd' on an item to create a Mermaid diagram file (.mmd), for destination='knowledge' it's auto-routed to the KB's mermaid/ bucket (kind ignored, not required); Pass format='html' for an HTML report, destination MUST be 'knowledge' (html reports are auto-routed to the KB's html/ bucket; kind is ignored and not required for html). Format defaults to 'md'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | Files to create. Single-element array = one-file case. Max 200 per call. |