upload_file
Upload binary files like images or PDFs to a remote Typleaf project, then commit and push the change automatically.
Instructions
Upload a local (possibly BINARY) file into a Typleaf project. Use this for images (PNG/JPG), PDFs, and other non-text assets that must not be UTF-8 decoded. Commits and pushes immediately.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Destination path inside the project (e.g. 'figures/cat.png'). | |
| overwrite | No | If true, replace an existing file at file_path. Default false. Accepts boolean or case-insensitive string ('true'/'false'/'1'/'0'/'yes'/'no'). | |
| project_id | Yes | Typleaf project ID — a 24-character lowercase hex string (e.g. '692a83fb82feceb233c4b0e7'), obtained from list_projects or the project URL. NOT a local filesystem path, NOT '.', NOT a project name or title. These tools operate on the REMOTE Typleaf project. Only call these tools when the user explicitly asks to work with a Typleaf project — never for general local file I/O. If you already have a copy of THIS project checked out on the local filesystem, prefer the standard read/grep tools against that path. Always call list_projects first when unsure. | |
| source_path | Yes | Local filesystem path of the file to upload. | |
| commit_message | No | Git commit message |