# fs_upload_status

Inspect your upload's durable offset or final receipt, including after a lost reply or machine restart. Requires the original caller and current write permission.

**In short:** Risk class [`write`](https://docs.cmdop.ai/reference/tools.md#risk-classes). Over MCP call `fs_upload_status`; over HTTP send `"tool": "fs_upload_status"` to [`POST /api/v1/call`](https://docs.cmdop.ai/reference/http/post-call.md).

## Arguments

Over MCP every tool also takes `machine`: the machine's name or id, optional when only one machine is online.

| Name | Type | Required | Meaning |
| --- | --- | --- | --- |
| `transfer` | `string` | yes | The id bound by `fs_upload_begin`, owned by this same authenticated caller. |

## Result

| Name | Type | Required | Meaning |
| --- | --- | --- | --- |
| `chunk_max_bytes` | `integer` | yes | Maximum decoded bytes in a chunk. |
| `expires_at` | `integer` | yes | Fixed expiry as Unix seconds. |
| `offset` | `integer` | yes | Durable confirmed byte offset. Only continue from this value. |
| `path` | `string` | yes | Bound canonical absolute destination. |
| `receipt` | `object` | no | Present only after verified publication. |
| `sha256` | `string` | yes | Expected whole-file SHA-256; a committed receipt confirms verification. |
| `size` | `integer` | yes | Expected whole-file decoded bytes. |
| `state` | `"uploading" \| "committed" \| "aborted" \| "expired"` | yes | Current durable state. |
| `transfer` | `string` | yes | Client-generated upload id. |

## Examples

**MCP**

```json
{
  "name": "fs_upload_status",
  "arguments": {
    "machine": "<machine>",
    "transfer": "<transfer>"
  }
}
```

**HTTP**

```bash
curl -sS -X POST "https://<contour>.cmdop.dev/api/v1/call" \
  -H "Authorization: Bearer $CMDOP_TOKEN" \
  -H "x-cmdop: 1" \
  -H "Content-Type: application/json" \
  -d '{"machine":"<machine>","tool":"fs_upload_status","args":{"transfer":"<transfer>"}}'
```

## Limits

The call times out after 60 s (`timed_out`). Available since version 0.1.18. A refused or failed call returns one of the [error codes](https://docs.cmdop.ai/reference/errors.md).

## Notes

Use the original authenticated client and transfer identifier after a lost chunk or commit
reply, including after the machine reconnects or restarts. The confirmed `offset` is the
point from which an unfinished upload may continue. A `committed` result includes the
verified destination receipt; retain it before starting another upload.

The machine keeps at most 128 terminal receipts. An `aborted` or `expired` transfer cannot
continue. A missing status can mean an unknown identifier, a different caller or an evicted
receipt; it does not prove the destination was never created. Inspect its size and SHA-256
before choosing a new transfer. If the needed read is outside your grant, ask the owner to
verify the destination.

See [SDK recovery](https://docs.cmdop.ai/reference/sdk/files-and-screen.md#recover-after-a-disconnect-or-cancellation).
