Centralized file operations for Genesis. Upload, register, attach, list, read, download, and delete files with one-call Git save and rich metadata.
All items below are actions of file_manager_tool
.
UPLOAD_FILE
: Upload a new text or binary file and optionally attach it immediately.REGISTER_EXISTING_FILE
: Register a file that already exists on disk so it is tracked by the system.REGISTER_FILE_FROM_STORAGE
: Register a file from a storage path and assign a friendly filename.SAVE_FROM_GIT
: Copy from repo to managed storage, register, and attach in one efficient call.LIST_FILES
: List files with filters such as project, data agent, thread, or index.GET_FILE_INFO
: Return metadata for a file by id.GET_FILE_CONTENT
: Read text content with pagination by lines or characters.GET_FILE_BY_PATH
: Resolve a file record using an absolute storage path.ATTACH_FILE
: Attach a registered file to a specific entity.DETACH_FILE
: Remove an entity association without deleting the file.DOWNLOAD_FILE
: Create a safe download link token for user delivery.DELETE_FILE
: Permanently delete a file.Upload and Register
Attach to Entities
Search and Filter
Read and Preview
Save from Git
Share Securely
file_manager_tool
UPLOAD_FILE
Name | Definition | Format |
---|---|---|
action | Must be UPLOAD_FILE . | String |
filename | Descriptive filename. | String |
text_content | Plain text content to store. | String |
content | Base64 payload for binaries. | String |
mime_type | MIME type for correct handling. | String |
entity_type | Entity to attach on upload. | String |
entity_id | Target entity id. | String |
LIST_FILES
.LIST_FILES
Name | Definition | Format |
---|---|---|
action | Must be LIST_FILES . | String |
filters | Filter object. Start with {"bot": "<bot_id>"} or a project id. | Object |
GET_FILE_INFO
Name | Definition | Format |
---|---|---|
action | Must be GET_FILE_INFO . | String |
file_id | Unique file identifier. | String |
GET_FILE_CONTENT
Name | Definition | Format |
---|---|---|
action | Must be GET_FILE_CONTENT . | String |
file_id | Unique file identifier. | String |
pagination_mode | lines , chars , or null for chunk based. | String |
start | Zero based offset for the chosen mode. | Integer |
count | Number of lines or chars to return. | Integer |
pagination_mode: "lines"
for code or SQL, and pagination_mode: "chars"
for prose or logs to keep previews snappy.GET_FILE_BY_PATH
Name | Definition | Format |
---|---|---|
action | Must be GET_FILE_BY_PATH . | String |
file_path | Absolute storage path to resolve. | String |
REGISTER_FILE_FROM_STORAGE
Name | Definition | Format |
---|---|---|
action | Must be REGISTER_FILE_FROM_STORAGE . | String |
filename | Friendly filename to display. | String |
file_path | Path to file in storage. | String |
REGISTER_EXISTING_FILE
Name | Definition | Format |
---|---|---|
action | Must be REGISTER_EXISTING_FILE . | String |
file_path | Absolute path to existing file. | String |
filename | Descriptive filename. | String |
ATTACH_FILE
Name | Definition | Format |
---|---|---|
action | Must be ATTACH_FILE . | String |
file_id | File to attach. | String |
entity_type | One of project todo asset bot thread message index . | String |
entity_id | Target id for the attachment. | String |
DETACH_FILE
Name | Definition | Format |
---|---|---|
action | Must be DETACH_FILE . | String |
file_id | File to detach. | String |
entity_type | Entity type to remove. | String |
entity_id | Target id to remove from. | String |
DOWNLOAD_FILE
Name | Definition | Format |
---|---|---|
action | Must be DOWNLOAD_FILE . | String |
file_id | File to create a download link for. | String |
DELETE_FILE
Name | Definition | Format |
---|---|---|
action | Must be DELETE_FILE . | String |
file_id | File to remove permanently. | String |
SAVE_FROM_GIT
Name | Definition | Format |
---|---|---|
action | Must be SAVE_FROM_GIT . | String |
source_path | Absolute path to the repo file. | String |
target_path | Destination directory in managed storage. | String |
target_filename | Optional new filename. | String |
commit_message | Optional provenance message. | String |
entity_type | Entity to auto attach. | String |
entity_id | Target entity id. | String |
DELETE_FILE
.UPLOAD_FILE
or REGISTER_*
.ATTACH_FILE
for context.LIST_FILES
and fetch metadata using GET_FILE_INFO
.GET_FILE_CONTENT
and pagination.DOWNLOAD_FILE
.DETACH_FILE
or DELETE_FILE
when the lifecycle is complete.SAVE_FROM_GIT
.UPLOAD_FILE
.start
, count
, actual_count
, has_more
.