# Tools reference

All tools except `register` need your access key in the `Authorization` header. A failed call returns a tool error with a message, not a protocol error.

| Tool | What it does |
|---|---|
| [`register`](#register) | Create an account and get a key |
| [`whoami`](#whoami) | Who the key belongs to, usage and limits |
| [`upload_file`](#upload-file) | Store a file |
| [`download_file`](#download-file) | Read a file |
| [`list_files`](#list-files) | List your files |
| [`delete_file`](#delete-file) | Delete a file now |
| [`share_file`](#share-file) | Make a read-only link |
| [`list_links`](#list-links) | List active links |
| [`revoke_link`](#revoke-link) | Stop a link working |
| [`link_activity`](#link-activity) | Who opened a link |

## register

Create an account. Only needed once, and only when you have no key. The key is shown once.

| Argument | Notes |
|---|---|
| `full_name`, `email` | Required |
| `organization`, `purpose` | Optional |
| `signup_code` | Only if the operator requires one |
| `key_name` | Name for the first key (default `default`) |

## whoami

No arguments. Returns the account, the key's name, usage and limits.

## upload_file

Store a file. Overwrites a file with the same name.

| Argument | Notes |
|---|---|
| `name` | Required. Letters, digits, `.`, `_`, `-`; max 128 |
| `content` | Text content |
| `content_base64` | Binary content, base64 encoded, instead of `content` |
| `content_type` | Optional MIME type; guessed from the name otherwise |
| `ttl` | `15m`, `1h`, `24h`, `7d`, `14d` or seconds. Pick the shortest that fits |
| `visibility` | `public` or `private` (default). Public also returns `public_url` and `raw_url` |

Up to 5 MB through MCP.

## download_file

`name` (required). Returns text when the file is UTF-8 and small, base64 when it is binary and under 1 MB. For larger files, call `share_file` and fetch the link with `curl`.

## list_files

No arguments. Name, size, type and when each expires.

## delete_file

`name` (required). Removes the file and its links now.

## share_file

Make a read-only link to a file. The link hides the file's name and never outlives the file.

| Argument | Notes |
|---|---|
| `name` | Required |
| `access` | `public` (default) or `private` |
| `passphrase` | Private links: 8 to 200 characters. Tell the reader separately |
| `allow` | Private links: fingerprints (`sha256:...`) allowed to read, max 20 |
| `max_downloads` | 1 to 1000. The link stops working after that many reads |
| `ttl` | Link lifetime, shorter than the file's |
| `label` | A note for yourself, up to 60 characters |

A private link's URL is shown once.

## list_links

Optional `name` limits it to one file. Public links include their URL; private links cannot show theirs again.

## revoke_link

`id` (required), like `l_0123456789ab`.

## link_activity

`id` (required) and an optional `limit` of 1 to 500 events (default 200). The same answer as [`GET /links/{id}/activity`](api-links.md#link-activity): totals and visitor sessions, with a visitor named only when they presented their own key. The server's `logging` setting says whether IPs are full, masked or off.
