--- title: "Card and files" description: "Read free space per card slot on a Sony, Canon or Nikon camera, list its photos and clips, preview one and download it. Nothing on the card is changed." url: https://darkgrade.com/docs/functionality/media last_updated: 2026-12-04 docs_index: https://darkgrade.com/docs/llms.txt --- # Card and files > Read free space per card slot on a Sony, Canon or Nikon camera, list its photos and clips, preview one and download it. Nothing on the card is changed. > ## Documentation Index > Fetch the complete documentation index at: https://darkgrade.com/docs/llms.txt > Use this file to discover all available pages before exploring further. See how much space the card in a Sony, Canon or Nikon camera has, list the photos and clips on it, look at one, and copy it to your computer. Nothing on the card is ever deleted or changed. | What | Does | | - | - | | [Card space](#card-space) | Free space, photos and recording time left. | | [List photos and clips](#list-photos-and-clips) | The photos and clips on the card, newest first. | | [Preview a file](#preview-a-file) | A small JPEG of a photo or clip. | | [Download a file](#download-a-file) | Copy a photo or clip off the card. | Each example has a tab per product. Pick yours once and every example follows. In Studio, the microphone that starts [voice](https://darkgrade.com/docs/studio/voice.md) is under the picture. MCP tabs show the tool Claude calls on Studio; on [your own server](https://darkgrade.com/docs/ai/server.md#what-differs-from-studio) the tools also take `camera`. Each CLI command opens the camera, does one thing and closes it. ## Card space For each card slot: the free space, how many photos still fit and how much recording time is left, as the camera reports them now. ```text Studio The camera pill shows the space left on the card. Click it for the photos and video that still fit. Or click the microphone and ask “How much space is left?” ``` ```text MCP Ask Claude: “How much space is left on the card?” → camera_get_card_status {} ``` ```bash CLI npx darkgrade camera get-card-status ``` ```typescript Slate const cards = await camera.getCardStatus() // one entry per card slot ``` ### What you get back Slate returns a list of [`CardStatus`](https://darkgrade.com/docs/slate/reference/types-results.md#cardstatus). [MCP](https://darkgrade.com/docs/ai/results.md#what-a-tool-returns) and the [CLI](https://darkgrade.com/docs/cli/output.md#json-results) return the same fields as JSON. - **`slot`** · `number` The card slot: 1 for the first. - **`state`** · `"ready"` `"absent"` `"error"` `"unknown"` `ready`: a card is in and readable. `unknown`: the camera did not say. - **`writable`** · `boolean` · optional Whether the camera says it can record to this card; absent when it does not say. - **`capacityBytes`** · `number` · optional The size of the card, in bytes. - **`freeBytes`** · `number` · optional The space left, in bytes. - **`photosRemaining`** · `number` · optional How many photos still fit at the current format. - **`recordingSecondsRemaining`** · `number` · optional The recording time left, in seconds, at the current video settings. Also called *card info*, *free space*, *photos remaining*, *recording time left*, *storage info*. Slate reference: [`getCardStatus`](https://darkgrade.com/docs/slate/getting_started/camera.md#getcardstatus) ## List photos and clips Lists the photos and clips on the card, newest first. Each has an id that the preview and the download take. ```text Studio In the sidebar, open Card to see the files on the card. Or click the microphone and ask “What's on the card?” ``` ```text MCP Ask Claude: “What's on the card?” → camera_list_media {} ``` ```bash CLI npx darkgrade camera list-media --json ``` ```typescript Slate const items = await camera.listMedia() // newest first ``` ### What you get back Slate returns a list of [`MediaItem`](https://darkgrade.com/docs/slate/reference/types-results.md#mediaitem). [MCP](https://darkgrade.com/docs/ai/results.md#what-a-tool-returns) and the [CLI](https://darkgrade.com/docs/cli/output.md#json-results) return the same fields as JSON. - **`id`** · `string` The id that the preview and the download take. It stays the same after a reconnect. - **`name`** · `string` The file name on the card, such as `DSC01234.ARW`. - **`kind`** · `"photo"` `"clip"` `"other"` Whether the file is a photo, a clip, or something else. - **`slot`** · `number` The card slot the file is in: 1 for the first. - **`sizeBytes`** · `number` · optional The size of the file, in bytes. - **`capturedAt`** · `string` · optional When it was taken, in the camera's local time, such as `2026-11-24T14:05:09`. - **`widthPixels`** · `number` · optional The width of the picture, in pixels. - **`heightPixels`** · `number` · optional The height of the picture, in pixels. - **`previews`** · `readonly MediaPreviewSize[]` The preview sizes this file has: `thumbnail`, `preview`, or both. * An id stays the same after a reconnect, for as long as the file is on the card. * The first list on a full card can be slow, because some cameras describe each file separately. Also called *list photos*, *list clips*, *gallery*, *card index*, *browse card*. Slate reference: [`listMedia`](https://darkgrade.com/docs/slate/getting_started/camera.md#listmedia) ## Preview a file Gets a JPEG picture of a photo or clip on the card: a small thumbnail, or a larger preview where the camera has one. ```text Studio In the sidebar, open Card and click a file to see it large. ``` ```text MCP Ask Claude: “Show me the last photo.” → camera_list_media {} then, with the id of the newest item: → camera_get_media_preview {"id": "…", "size": "preview"} ``` ```bash CLI ID=$(npx darkgrade camera list-media --json | jq -r '.[0].id') npx darkgrade camera get-media-preview "$ID" --size preview \ --output preview.jpg ``` ```typescript Slate const [item] = await camera.listMedia() // newest first const jpeg = await camera.getMediaPreview(item.id, 'preview') ``` ### Inputs - **`id`** · text · required The id of a file, from [List photos and clips](#list-photos-and-clips). - **`size`** · `thumbnail` `preview` · CLI `--size` Default `thumbnail`. `preview` is a larger JPEG. Each file in the list says which sizes it has, as `previews`. ### What you get back The JPEG's bytes in Slate. The CLI saves them as `-preview.jpg` unless `--output` names a file, and MCP attaches the picture for Claude to look at. Also called *thumbnail*, *get thumbnail*, *media thumbnail*, *preview photo*. Slate reference: [`getMediaPreview`](https://darkgrade.com/docs/slate/getting_started/camera.md#getmediapreview) ## Download a file Copies a photo or clip off the card to your computer. Nothing on the card is deleted or changed. ```text Studio In the sidebar, open Card, hover over a file and click its download arrow. Download all copies every file. Files go to the folder named at the bottom of Card: Darkgrade Studio in your Pictures folder, unless you change it. ``` ```text MCP Ask Claude: “Download the last clip.” → camera_list_media {} then, with the id of the newest item: → camera_download_media {"id": "…"} Claude gets the file's name and size, not the file. ``` ```bash CLI ID=$(npx darkgrade camera list-media --json | jq -r '.[0].id') # Pass --output: a download has no file name of its own. npx darkgrade camera download-media "$ID" --output clip.mp4 ``` ```typescript Slate import { writeFile } from 'node:fs/promises' const [item] = await camera.listMedia() // newest first const bytes = await camera.downloadMedia(item.id) await writeFile(item.name, bytes) ``` **Progress and cancel.** Slate reports progress as the file arrives and can cancel part-way. MCP and the CLI run a download to the end. ```typescript Slate const controller = new AbortController() const bytes = await camera.downloadMedia(item.id, { onProgress: (received, total) => console.log(received, total), signal: controller.signal, // controller.abort() cancels }) ``` ### Inputs - **`id`** · text · required The id of a file, from [List photos and clips](#list-photos-and-clips). - **`onProgress`** · `(receivedBytes, totalBytes) => void` · Slate only Called after each part of the file arrives. - **`signal`** · `AbortSignal` · Slate only Cancels the download between parts. ### What you get back The file's bytes in Slate. The CLI saves them as `-download` (`-download.jpg` for a JPEG) unless `--output` names a file, so pass `--output` for clips and RAW photos. - Over MCP the file is not sent to Claude, and Studio's server does not save it. To get a file onto disk, use Studio's Card section, the CLI or Slate, or give your own server a [`saveFile`](https://darkgrade.com/docs/ai/server.md#save-photos-and-downloads). Also called *get media*, *save to computer*. Slate reference: [`downloadMedia`](https://darkgrade.com/docs/slate/getting_started/camera.md#downloadmedia)