Skip to main content

Overview

Tool Name

Purpose

The file_manager_tools provide unified file operations across the platform. Use them to upload or register files, attach them to entities like projects or threads, preview large text safely, create download links, and streamline Git to storage workflows with a single call.

Functions Available

All items below are actions of file_manager_tool.
  1. UPLOAD_FILE: Upload a new text or binary file and optionally attach it immediately.
  2. REGISTER_EXISTING_FILE: Register a file that already exists on disk so it is tracked by the system.
  3. REGISTER_FILE_FROM_STORAGE: Register a file from a storage path and assign a friendly filename.
  4. SAVE_FROM_GIT: Copy from repo to managed storage, register, and attach in one efficient call.
  5. LIST_FILES: List files with filters such as project, data agent, thread, or index.
  6. GET_FILE_INFO: Return metadata for a file by id.
  7. GET_FILE_CONTENT: Read text content with pagination by lines or characters.
  8. GET_FILE_BY_PATH: Resolve a file record using an absolute storage path.
  9. ATTACH_FILE: Attach a registered file to a specific entity.
  10. DETACH_FILE: Remove an entity association without deleting the file.
  11. DOWNLOAD_FILE: Create a safe download link token for user delivery.
  12. DELETE_FILE: Permanently delete a file.

Key Features

Upload and Register

Add new files or register existing ones with rich metadata.

Attach to Entities

Link files to projects, todos, data agents, threads, messages, or indices for traceability.

Search and Filter

Find files quickly with scoped filters across related entities.

Read and Preview

Page through large text or code safely by lines or characters.

Save from Git

One call to save from repo, register, and attach for fast handoffs.

Share Securely

Generate expiring download links for stakeholders.

Input Parameters for Each Function

file_manager_tool

UPLOAD_FILE

Use descriptive filenames that encode purpose, owner, and date to improve discoverability in LIST_FILES.

LIST_FILES

GET_FILE_INFO

GET_FILE_CONTENT

Prefer pagination_mode: "lines" for code or SQL, and pagination_mode: "chars" for prose or logs to keep previews snappy.

GET_FILE_BY_PATH

REGISTER_FILE_FROM_STORAGE

REGISTER_EXISTING_FILE

ATTACH_FILE

DETACH_FILE

DOWNLOAD_FILE

DELETE_FILE

SAVE_FROM_GIT

**Deletion is permanent. **Confirm backups or retention requirements before calling DELETE_FILE.

Use Cases

  1. Project evidence
    • Attach specs and extracts to a project for review and sign off.
  2. Repo handoff
    • Save a generated PDF from repo to storage and attach it to the current thread.
  3. Inventory discovery
    • List and filter files by project or data agent to locate the latest assets quickly.
  4. Large log review
    • Page through big SQL logs without loading the entire file.
  5. Stakeholder delivery
    • Generate a download link for stakeholders to retrieve a produced report.

Workflow/How It Works

  1. Upload or register files with UPLOAD_FILE or REGISTER_*.
  2. Attach to the relevant entity with ATTACH_FILE for context.
  3. Explore inventory via LIST_FILES and fetch metadata using GET_FILE_INFO.
  4. Preview text safely with GET_FILE_CONTENT and pagination.
  5. Share externally with DOWNLOAD_FILE.
  6. Retire artifacts with DETACH_FILE or DELETE_FILE when the lifecycle is complete.

Integration Relevance

  • git_action to source inputs and save binaries with SAVE_FROM_GIT.
  • project_manager_tools to keep artifacts tied to missions and todos.
  • document_index_tools to index stored files for search and Q&A.
  • artifact_manager_tools for generated outputs that later become managed files.
  • google_drive_tools to export results and then register or attach them.

Configuration Details

  • Use absolute paths for registration and ensure read or write permissions.
  • Base64 encode binary payloads for UPLOAD_FILE.
  • Choose precise MIME types for correct rendering and preview behavior.
  • Filter hierarchically when listing files to avoid noisy result sets.
  • Adopt clear filename conventions that encode purpose and entity context.

Limitations or Notes

  1. Very large files may hit upload or storage limits depending on policy.
  2. Git operations require network access and repo permissions.
  3. Entity attachments will fail if the target id is invalid.
  4. Binary corruption can occur if payloads are not base64 encoded correctly.
  5. Concurrent writes or deletes may require coordination to avoid conflicts.

Output

  • Upload and Registration: File id, metadata summary, and storage location.
  • Lists and Info: Arrays of file records with names, sizes, MIME, timestamps, and relationships.
  • Content Preview: Text segments plus pagination fields start, count, actual_count, has_more.
  • Attachments: Confirmation of attach or detach operations.
  • Git Save: Commit info, registration details, and attachment confirmation.
  • Download: Download token or path reference.
  • Errors: Descriptive messages with remediation guidance.