tags.add
Add tags to a file by file ID, preserving existing tags and auto-creating new tag names in the local SQLite database. Labels a single file for easier classification and retrieval.
Instructions
Append tags to ONE file. Additive — existing tags are preserved; re-adding an existing tag is a no-op (idempotent per tag). New tag names auto-create rows in the global tags table. Persists to local SQLite. No external auth or rate limits. Returns {success: true}; throws if file_id is unknown. Use to label a single file. To tag every file matching a query in one call use tags.search; to remove tags use tags.remove.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | Yes | Array of tag names to add | |
| file_id | Yes | File ID |