create_file
Create a new markdown file and add it to the searchable knowledge base. Supports global, project, or schema destinations with automatic indexing.
Instructions
Create a new markdown file in the knowledge base or project. This operation writes a new file to disk and adds it to the local SQLite FTS5 index. Destination can be 'knowledge' (global KB), 'project' (reference file inside a project repo), or 'ctxnest' (internal CtxNest schema file). If destination is 'project' or 'ctxnest', project_id is strictly required. No external auth required. Rate limits do not apply (local operation). Returns the created file metadata including its new ID, path, and estimated tokens. If the destination directory does not exist, it will be created automatically. Use this tool to instantiate new contextual documents or notes. To modify an existing file, use 'update_file' instead. Parameters: 'destination' dictates required fields; if 'project' or 'ctxnest', 'project_id' must be a valid integer. 'tags' and 'folder' are optional.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Title of the file | |
| content | Yes | Content of the file | |
| destination | Yes | Destination type | |
| project_id | No | Project ID (required for project/ctxnest destinations) | |
| folder | No | Optional folder path | |
| tags | No | Optional array of tags |