add_document
Add a new document to the knowledge base by providing text content and a file path. The document is indexed and becomes searchable instantly.
Instructions
Add a new document to the knowledge base from raw text content.
Mutating — writes a file to disk and indexes it immediately. No auth required.
Args: content: Full text content of the document (markdown supported) filepath: Relative path within documents directory (e.g., "security/new-technique.md"). The subdirectory should match the category. category: Document category — one of: security, ctf, logscale, development, general, redteam, blueteam (default: general)
Returns: JSON string with indexing results (filepath, chunks created, status).
Usage: Use to add new documents from text content. Use add_from_url() instead when the source is a web page. Use update_document() to replace content of an existing file. The document is immediately searchable after this call — no manual reindex needed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | ||
| filepath | Yes | ||
| category | No | general |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |