uploads.sh
v0.64.1Host files from coding agents; stage on a branch and attach to GitHub PRs.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
gallery_create Create gallery
Create a public ordered media gallery in the workspace. The returned canonical URL is safe to give users, but anyone who knows it can view the gallery and its media.
| Parameter | Type | Description |
|---|---|---|
title * | string | Gallery title (1–120 characters). |
description | string | Optional public gallery description. |
workspace | string | Override the workspace for this call (like the CLI's --workspace flag). |
gallery_get Get gallery
Get a workspace-owned gallery, including ordered media and its canonical public URL. Gallery media is public to anyone with the URL.
| Parameter | Type | Description |
|---|---|---|
galleryId * | string | Opaque gallery ID. |
workspace | string | Override the workspace for this call (like the CLI's --workspace flag). |
gallery_add Add gallery item
Add one existing, publicly served workspace object to a gallery. Reads the latest gallery version before writing, so the optimistic API version is handled safely. Does not upload or delete the object.
| Parameter | Type | Description |
|---|---|---|
galleryId * | string | Opaque gallery ID. |
objectKey * | string | Existing public object key to add. |
altText | string | Optional public alt text. |
caption | string | Optional public caption. |
workspace | string | Override the workspace for this call (like the CLI's --workspace flag). |
gallery_link Link gallery
Link a gallery to an external reference. References use provider-neutral fields; github currently accepts owner/repo#number or a strict GitHub issue/PR URL. No GitHub credentials or API calls are used.
| Parameter | Type | Description |
|---|---|---|
coordinate * | string | Provider-native external reference coordinate. |
galleryId * | string | Opaque gallery ID. |
provider * | string | External provider (currently github). |
workspace | string | Override the workspace for this call (like the CLI's --workspace flag). |
gallery_find_by_reference Find galleries
Find workspace galleries linked to an external reference. Returns gallery summaries and canonical public URLs without contacting the provider.
| Parameter | Type | Description |
|---|---|---|
coordinate * | string | Provider-native external reference coordinate. |
provider * | string | External provider (currently github). |
cursor | string | Pagination cursor from a previous response. |
limit | number | Page size (default 50, max 100). |
workspace | string | Override the workspace for this call (like the CLI's --workspace flag). |
feed_create Create change feed
Create a public newest-first screenshot feed (same product as CLI `uploads feed create`). Pass `repo` alone for the whole GitHub repo. Pass `pr` plus `repo` — or `github` as owner/repo#123 / a GitHub PR URL — to scope that same feed to one pull request. `issue` does the same for an issue. Optional `path` filters by page-path metadata. Creating the same scope again returns the existing URL. This is a live query, not a curated gallery. Anyone who knows the URL can view it. See https://uploads.sh/docs/feeds.
| Parameter | Type | Description |
|---|---|---|
github | string | Scope via owner/repo#number or a GitHub issue/PR URL. Supplies repo when omitted. Mutually exclusive with pr and issue. |
issue | integer | Scope the feed to this issue. Mutually exclusive with pr and github. |
path | string | Optional exact page-path metadata filter, for example /settings. |
pr | integer | Scope the feed to this pull request. Same product as a repo feed — one extra filter. Mutually exclusive with issue and github. |
repo | string | GitHub owner/repo, for example acme/app. Required unless github is set. |
workspace | string | Override the workspace for this call (like the CLI's --workspace flag). |
feed_get Get change feed
Get a workspace-owned change feed by ID, including its current newest-first screenshots and the canonical public /c/<id> URL. Each item includes pageUrl (`/c/<id>/<item>`) for the pager. The feed may be repo-wide or scoped to one pull request / issue (see `number` and `kind` on the result). Anyone with the URL can view the media.
| Parameter | Type | Description |
|---|---|---|
feedId * | string | Opaque feed ID. |
workspace | string | Override the workspace for this call (like the CLI's --workspace flag). |
put Upload file
Upload one or more files and get a public URL plus GitHub-ready markdown. Prefer `embedUrl` in GitHub markdown. Pass `contentUrl` for a public HTTPS file, or http://localhost on this machine, instead of a local path. With `pr`/`issue`, keys are stable and the managed comment is synced. `holdCheck: pending` means the classifier may still hold the file for review (it decides after the upload); `comment.held` counts files on the PR or issue held for review; see `list_held`. All uploads are public. Accepts images (PNG, JPEG, GIF, WebP, AVIF), video (MP4, WebM, MOV), PDF, zip, gzip, and text (plain…
| Parameter | Type | Description |
|---|---|---|
alt | string | Alt text for the markdown (default: each file's name; with multiple files applies to all). |
app | string | Which surface is shown: web, ios, android, cli. Worth setting only when the same route exists on more than one surface. |
caption | string | What the shot shows, in plain words (up to 140 printable ASCII characters), e.g. "Empty state after deleting the last project". Shown under the image in the PR comment. |
comment | boolean | With `pr`/`issue` (or an auto-detected PR): create or update the managed attachments comment. Best-effort. |
contentBase64 | string | Base64-encoded file content for in-memory uploads; requires filename. |
contentType | string | Override the Content-Type (ignored when optimize rewrites the body). |
contentUrl | string | URL to fetch and upload. Public HTTPS, or http://localhost / 127.0.0.1 / *.localhost on this machine. Filename is optional when the URL path has a leaf. Other private/internal hosts are rejected. Exac… |
destination | string | Typed destination root: screenshots | gh | f. Sets the key prefix; first-class alternative to prefix. With pr/issue must be gh or omitted. |
dryRun | boolean | Resolve key + public URL without uploading (also previews a strict-key refusal via wouldRefuse). Not with comment. |
file | string | Path of a single file to upload. Exactly one of file, files, contentBase64, or contentUrl is required. |
filename | string | Filename for contentBase64/contentUrl (drives the key and content type). With single `file`, overrides the key's leaf (clean name) while keeping the pr/default path. |
files | array | Paths of multiple files to upload in parallel. Returns { uploads, failures }. Cannot combine with file, contentBase64, contentUrl, key, or filename. |
frame | string | Optional frame before optimize: phone | browser | iphone-16-pro. |
frameFit | string | cover (default) or contain. |
frameUrl | string | Address bar text for frame=browser. |
issue | number | Attach to this issue. Mutually exclusive with pr. |
keepExif | boolean | Keep EXIF/XMP/ICC when optimizing (default: strip for privacy on public embeds). |
key | string | Override the object key. Single file only; cannot combine with `pr`/`issue`. |
metadata | object | Queryable tags for later search (key→value). Use `path` for the route (e.g. /settings), not route/page. Omit to leave existing tags; pass an object (even {}) to replace them. `state`, `app`, `screen… |
noGit | boolean | Don't derive the repo segment from git. |
noOptimize | boolean | Skip client-side image optimization (default: optimize still images to WebP). |
noPr | boolean | Skip auto-PR context (issue #700): without pr/issue/key/ref/prefix/destination, a call on a branch mapping to exactly one open PR otherwise behaves as if pr had been passed (stable key + managed comme… |
optimizeMaxEdge | number | Max long edge in pixels when optimizing (default: 2400). |
optimizeQuality | number | WebP quality 1–100 when optimizing (default: 85). |
pr | number | Attach to this pull request. Mutually exclusive with issue. |
prefix | string | Key prefix (default: screenshots, or UPLOADS_DEFAULT_PREFIX). Cannot be combined with pr/issue. |
ref | string | PR/issue/branch key segment (default: today, or UPLOADS_DEFAULT_REF). Cannot be combined with pr/issue. |
replace | boolean | Overwrite an existing object on a non-`gh/` key. Default false (or true if UPLOADS_OVERWRITE=1). No effect on `pr`/`issue` keys, which always overwrite. |
repo | string | owner/name repo segment (default: git remote, or UPLOADS_DEFAULT_REPO). |
screen | string | The app screen shown, for views with no route (a mobile or desktop screen), e.g. "Chat". Shown under the image in the PR comment. Use `path` in metadata for web routes. |
state | string | The UI state this image shows. Set it whenever the image is one side of a comparison — before/after is the most useful pair in a PR, and is what makes `find_files` with state=after work later. |
width | number | Emit <img width=…> markdown instead of a plain image embed. |
workspace | string | Override the workspace for this call (like the CLI's --workspace flag). |
screenshot Capture screenshot
Capture a URL or local HTML file in a local Chrome/Chromium and host it. Works on localhost. Shares put's attach, comment, and metadata options. `redact` blacks out elements (secrets, personal data) before capture.
| Parameter | Type | Description |
|---|---|---|
target * | string | http(s) URL, or a path to a local .html file. |
alt | string | Alt text for the markdown (default: derived filename). |
app | string | Which surface is shown: web, ios, android, cli. Worth setting only when the same route exists on more than one surface. |
browser | string | Explicit local browser executable path. |
caption | string | What the shot shows, in plain words (up to 140 printable ASCII characters), e.g. "Empty state after deleting the last project". Shown under the image in the PR comment. |
cdp | string | Attach to a running Chrome via CDP instead of launching one. |
colorScheme | string | Emulate prefers-color-scheme: dark | light. |
comment | boolean | With pr/issue (or auto-detected PR context): create/update the managed attachments comment (best-effort). |
destination | string | Typed destination root: screenshots | gh | f. With pr/issue must be gh or omitted. |
dryRun | boolean | Capture + resolve key/URL without uploading. Not with comment or galleryId. |
frame | string | Optional frame before optimize: phone | browser | iphone-16-pro. |
frameFit | string | cover (default) or contain. |
frameUrl | string | Address bar text for frame=browser. |
fullPage | boolean | Capture the full scrollable page. |
galleryId | string | Add the uploaded object to this public gallery. |
hide | array | CSS selectors to hide (display:none) before capture. |
issue | number | Attach to this issue. Mutually exclusive with pr. |
keepExif | boolean | Keep EXIF/XMP/ICC when optimizing. |
key | string | Explicit object key (default: <prefix>/<repo>/<ref>/<name>-<hash>.png). Cannot be combined with pr/issue. |
maxHeight | number | Cap on full-page capture height in CSS px (default: 5000, 0 = uncapped). A page over the cap is clipped, with a `hint` in the result. Requires fullPage. |
metadata | object | Queryable tags for later search (key→value). Use `path` for the route (e.g. /settings), not route/page. Omit to leave existing tags; pass an object (even {}) to replace them. `state`, `app`, `screen… |
noGit | boolean | Don't derive the repo segment from git. |
noHideDevTools | boolean | Don't auto-hide framework dev toolbars (Astro/Next/Nuxt/Vite), which are hidden by default for localhost/private-network targets. |
noOptimize | boolean | Skip client-side image optimization (default: optimize to WebP). |
noPr | boolean | Skip auto-PR context (issue #700): without pr/issue/key/ref/prefix/destination, a call on a branch mapping to exactly one open PR otherwise behaves as if pr had been passed. Also opts out via UPLOADS_… |
optimizeMaxEdge | number | Max long edge in pixels when optimizing. |
optimizeQuality | number | WebP quality 1-100 when optimizing. |
pr | number | Attach to this pull request. Mutually exclusive with issue. |
prefix | string | Key prefix (default: screenshots, or UPLOADS_DEFAULT_PREFIX). |
redact | array | CSS selectors to black out before capture (API keys, emails, tokens). Fails if a selector matches nothing. |
reducedMotion | boolean | Emulate prefers-reduced-motion: reduce so animations settle. |
ref | string | PR/issue/branch key segment (default: today, or UPLOADS_DEFAULT_REF). |
replace | boolean | Overwrite an existing object on a non-`gh/` key (e.g. an explicit `key`). Default false (or true if UPLOADS_OVERWRITE=1). No effect on `pr`/`issue`/branch keys, which always overwrite. |
repo | string | owner/name repo segment (default: git remote, or UPLOADS_DEFAULT_REPO). |
screen | string | The app screen shown, for views with no route (a mobile or desktop screen), e.g. "Chat". Shown under the image in the PR comment. Use `path` in metadata for web routes. |
selector | string | Capture one element instead of the viewport. |
state | string | The UI state this image shows. Set it whenever the image is one side of a comparison — before/after is the most useful pair in a PR, and is what makes `find_files` with state=after work later. |
via | string | Deprecated: captures always use the local browser. auto | local are accepted; remote was removed. |
viewport | string | WIDTHxHEIGHT[@SCALEx], e.g. 1280x800@2x (default: 1280x800@2). |
wait | string | Settle strategy: load (default) | domcontentloaded | networkidle | a millisecond count. |
width | number | Emit <img width=…> markdown instead of a plain embed. |
workspace | string | Override the workspace for this call (like the CLI's --workspace flag). |
attach Attach to GitHub
Upload one or more files as stable PR/issue attachments (in parallel) and maintain a managed GitHub comment. Returns `uploads` and `failures` (one bad file does not abort the batch). Each success has `url`, `embedUrl`, and `markdown` (prefer embedUrl for GitHub). With no pr/issue, targets the current branch PR, and files already staged for that branch are promoted into it (`promotion`/`promoteError`; renamed branches are followed automatically, or name the old branch with fromBranch). Attachments are public and keys are predictable; upload only non-sensitive media. On an issue, a Markdown arti…
| Parameter | Type | Description |
|---|---|---|
files * | array | Paths of the files to upload (at least one). |
app | string | Which surface is shown: web, ios, android, cli. Worth setting only when the same route exists on more than one surface. |
caption | string | What the shot shows, in plain words (up to 140 printable ASCII characters), e.g. "Empty state after deleting the last project". Shown under the image in the PR comment. |
contentType | string | Override the Content-Type (applied to every file; ignored when optimize rewrites). |
frame | string | Optional frame before optimize: phone | browser | iphone-16-pro. |
frameFit | string | cover (default) or contain. |
frameUrl | string | Address bar text for frame=browser. |
fromBranch | string | Promote files staged under this branch name instead of the current branch (for a branch renamed before the PR opened). |
issue | number | Attach to this issue. Mutually exclusive with pr. |
issueArtifacts | boolean | Per-call override for issue artifacts. Omit it to follow the repo file, then the workspace setting, then on. `false` skips them. No effect on pull requests. A failure is a warning on `comment.issueArt… |
keepExif | boolean | Keep EXIF/XMP/ICC when optimizing (default: strip for privacy on public embeds). |
metadata | object | Queryable tags for later search (key→value). Use `path` for the route (e.g. /settings), not route/page. Omit to leave existing tags; pass an object (even {}) to replace them. `state`, `app`, `screen… |
noComment | boolean | Upload only; don't create/update the managed comment. |
noOptimize | boolean | Skip client-side image optimization (default: optimize still images to WebP). |
noPromote | boolean | Skip promoting files staged for the current branch into the PR. |
optimizeMaxEdge | number | Max long edge in pixels when optimizing (default: 2400). |
optimizeQuality | number | WebP quality 1–100 when optimizing (default: 85). |
pr | number | Attach to this pull request. Mutually exclusive with issue. |
repo | string | owner/name repository (default: gh/git inference). |
screen | string | The app screen shown, for views with no route (a mobile or desktop screen), e.g. "Chat". Shown under the image in the PR comment. Use `path` in metadata for web routes. |
state | string | The UI state this image shows. Set it whenever the image is one side of a comparison — before/after is the most useful pair in a PR, and is what makes `find_files` with state=after work later. |
workspace | string | Override the workspace for this call (like the CLI's --workspace flag). |
list List files
List uploaded objects in the workspace, filtered by key prefix or by a PR/issue's attachments. Paginate with cursor, or set all to fetch every page.
| Parameter | Type | Description |
|---|---|---|
all | boolean | Follow cursors and return every page. |
cursor | string | Pagination cursor from a previous call. |
issue | number | List attachments for this issue. Mutually exclusive with pr. |
limit | number | Page size. |
pr | number | List attachments for this pull request. Mutually exclusive with issue. |
prefix | string | Key prefix filter (default: UPLOADS_DEFAULT_PREFIX + '/'). Cannot be combined with pr/issue. |
repo | string | owner/name repository (default: gh/git inference). |
workspace | string | Override the workspace for this call (like the CLI's --workspace flag). |
staged List staged files
List files staged for a git branch and whether they will auto-attach when a PR opens. Returns `{ repo, branch, files, binding }`.
| Parameter | Type | Description |
|---|---|---|
branch | string | Branch name (default: current git branch, worktree-safe). |
repo | string | owner/name repo (default: gh/git remote inference). |
workspace | string | Override the workspace for this call (like the CLI's --workspace flag). |
unstage Unstage files
Clear staged files for a branch, or specific keys, without deleting them. Sets gh.status=unstaged so they drop out of uploads staged and auto-promotion. Pass branch (repo inferred) or keys, not both. Needs files:write.
| Parameter | Type | Description |
|---|---|---|
branch | string | Branch to clear. Does not default to the current branch. Mutually exclusive with keys. |
dryRun | boolean | Report what would change without writing. |
keys | array | Object keys to unstage. Mutually exclusive with branch. |
repo | string | owner/name repo (default: gh/git remote inference). Only with branch. |
workspace | string | Override the workspace for this call (like the CLI's --workspace flag). |
delete Delete file
Permanently delete one uploaded file by key, along with its metadata. Set dryRun to preview without deleting.
| Parameter | Type | Description |
|---|---|---|
key * | string | Object key to delete. |
dryRun | boolean | Report what would be deleted without deleting. |
workspace | string | Override the workspace for this call (like the CLI's --workspace flag). |
get_metadata Get metadata
Read the queryable tags on one file. Returns `{ metadata }` (empty when none). Same as `uploads meta get`.
| Parameter | Type | Description |
|---|---|---|
key * | string | Object key to inspect. |
workspace | string | Override the workspace for this call (like the CLI's --workspace flag). |
list_held List held files
List uploads held for review. The classifier holds a file it thinks shows a secret (an API key, a password, a token) or sensitive personal data (an ID, a card number). A held file stays out of the managed PR comment, feeds, and galleries until a workspace member approves it with `approve`. A signed-in member sees the real file on its /f/ page. On hosted storage an image URL returns a Held for review card, and any other raw URL returns 404. Pass `pr`/`issue` for one PR or issue, or `prefix`. Each item has a `reason` such as `secret: api_key`, and `sha`, the content hash of those bytes. `approve…
| Parameter | Type | Description |
|---|---|---|
issue | number | Held files on this issue. Mutually exclusive with pr. |
pr | number | Held files on this pull request. Mutually exclusive with issue. |
prefix | string | Only keys under this prefix. |
repo | string | owner/name repository (default: gh/git inference). |
workspace | string | Override the workspace for this call (like the CLI's --workspace flag). |
approve Approve held files
Release uploads held for review (see `list_held`): pass `keys`, or `pr`/`issue` to approve every held file there. The file returns at the same URL and the managed PR comment re-syncs. Check the file first: if it shows a real credential, rotate it and delete the file instead of approving. Same as `uploads approve`.
| Parameter | Type | Description |
|---|---|---|
issue | number | Approve every held file on this issue. Mutually exclusive with pr. |
keys | array | Held keys to approve. |
pr | number | Approve every held file on this pull request. Mutually exclusive with issue. |
repo | string | owner/name repository (default: gh/git inference). |
workspace | string | Override the workspace for this call (like the CLI's --workspace flag). |
set_metadata Set metadata
Set or delete queryable tags on an existing file. `set` wins over `delete` for the same key. Requires `set` and/or `delete`. Same as `uploads meta set`.
| Parameter | Type | Description |
|---|---|---|
key * | string | Object key to update. |
delete | array | Keys to remove. |
set | object | Keys to set or overwrite. Use `path` for the route (e.g. /settings), not route/page. |
workspace | string | Override the workspace for this call (like the CLI's --workspace flag). |
find_files Find files
Search files by metadata (`filters`) and/or filename substring (`name`). At least one is required. Same as `uploads find`.
| Parameter | Type | Description |
|---|---|---|
all | boolean | Follow the cursor and return every page, up to a bounded number of requests. A non-null `cursor` in the result means that bound was reached before the end — pass it back to continue. |
cursor | string | Opaque continuation from a previous call's `cursor`. Pass it back unchanged with the same filters/name to get the next page; a null `cursor` means there are no more pages. |
filters | object | Equality filters; all must match. Use `path` for the route (e.g. /settings), not route/page. Optional when `name` is set. |
limit | number | Page size (default 50, max 500). |
name | string | Case-insensitive substring match on object keys (1–128 chars). Optional when `filters` is non-empty. |
prefix | string | Key prefix filter, combinable with filters/name. |
workspace | string | Override the workspace for this call (like the CLI's --workspace flag). |
list_metadata_keys List metadata keys
List metadata keys in the workspace (with counts). Pass `key` to list that key's values instead. Use before `find_files`. Same as `uploads meta keys`.
| Parameter | Type | Description |
|---|---|---|
key | string | When set, return distinct values for this metadata key (with counts) instead of the key list. |
workspace | string | Override the workspace for this call (like the CLI's --workspace flag). |
usage Show usage
Workspace storage and monthly upload counters (and remaining headroom when budgets are configured). Same as `uploads usage`.
| Parameter | Type | Description |
|---|---|---|
workspace | string | Override the workspace for this call (like the CLI's --workspace flag). |
reconcile Reconcile usage
Rebuild usage ledger bytes/objects from storage (source of truth). Preserves the monthly upload counter. Requires files:write. Same as `uploads reconcile`.
| Parameter | Type | Description |
|---|---|---|
workspace | string | Override the workspace for this call (like the CLI's --workspace flag). |
purge_expired Purge expired files
Delete objects older than the workspace retentionDays setting, then reconcile. Skips if retention is unset. Requires files:delete. Same as `uploads purge-expired`.
| Parameter | Type | Description |
|---|---|---|
workspace | string | Override the workspace for this call (like the CLI's --workspace flag). |
comment Sync attachments comment
Create or update the managed attachments comment on a GitHub PR or issue, listing everything uploaded for it. Posts as uploads-sh[bot] when the GitHub App is installed on the repo; otherwise via local gh auth. Edits its own prior comment in place and never touches other comments. `held` counts files there held for review; see `list_held`.
| Parameter | Type | Description |
|---|---|---|
issue | number | Comment on this issue. Mutually exclusive with pr. |
pr | number | Comment on this pull request. Mutually exclusive with issue. |
repo | string | owner/name repository (default: gh/git inference). |
workspace | string | Override the workspace for this call (like the CLI's --workspace flag). |
search_docs Search uploads.sh docs
Search the public uploads.sh documentation. Use this to answer questions about uploads.sh product workflows, including: attaching screenshots and video to GitHub PRs and issues; staging files before a PR exists; galleries; the GitHub App; comment config (.uploads.yml); hosted MCP and agent setup; screenshot capture and redaction; plans and limits; bring-your-own bucket. Same as `uploads docs`. Returns titles, URLs, and snippets. Pass `page` to fetch the full markdown of one page (slug, path, or URL). Omit `query` to list the catalog.
| Parameter | Type | Description |
|---|---|---|
limit | number | How many search hits to return (default 5, max 50). Ignored when fetching one page. |
page | string | Fetch one page as markdown. Accepts a slug (`attach`), path (`/docs/agents`), or https://uploads.sh URL. |
query | string | Search query (e.g. 'stage before a PR'). A single slug like 'attach' fetches that page. |
changelog Product changelog
Read recent uploads.sh product updates (platform and CLI). Returns the latest entries with titles, dates, summaries, and a link to the full changelog at https://uploads.sh/changelog. Same as `uploads changelog`.
| Parameter | Type | Description |
|---|---|---|
limit | number | How many entries to return (default 5, max 50). |
whoami Who am I
Show the active uploads.sh identity: workspace, API URL, and token scopes. Use this to learn which workspace you're talking to. A successful result also means the API is up. For a full setup diagnosis, use `doctor`.
doctor Diagnose setup
Diagnose the configuration: API health, token auth, and workspace/token alignment. Returns the same report as `uploads doctor --json`, including hints.
| Parameter | Type | Description |
|---|---|---|
workspace | string | Override the workspace for this call (like the CLI's --workspace flag). |
report Send diagnostic report
Send an explicit diagnostic report to the uploads team (message + optional text log). Only call this when the user asked to submit feedback, a bug report, or error logs — never automatically. Do not include tokens, secrets, or private file contents. Same as `uploads report`.
| Parameter | Type | Description |
|---|---|---|
message * | string | Short description of the problem (required, 5–4000 chars). |
attachmentFilename | string | Filename label for attachmentText (default: trace.txt). |
attachmentText | string | Optional text log/trace body the user consented to send (max 256 KiB). Not a file path. |
command | string | Command that failed (e.g. put) — name only, no paths or args. |
contact | string | Optional contact for follow-up (email or handle). |
errorCode | string | Optional UploadsError code (e.g. KEY_POLICY). |
followUpOk | boolean | Optional: true if the user is happy to be contacted for more details, false if not. Omit if you didn't ask. |
type | string | One of: bug, error, idea, other (default: other). |