---
title: "read_storage_file"
description: "Generated reference for the management action read_storage_file: its description, access metadata, payload contract, and registration status."
slug: /reference/actions/read-storage-file
order: 56
visibility: public
redirects_from: []
---

# read\_storage\_file

Generated automatically from the [published contract sources](/cloud/reference/about/#contract-sources).

A script calls this action over HTTPS at `POST https://tzcloud.dev.turnzero.ai/v1/read_storage_file`, with a bearer credential and the action's payload as the JSON body. It also accepts `GET`. Customer MCP connections do not list this action.

OAuth access tokens and minted tokens, including the turnzero command's computer token, are bearer credentials. The action determines which kinds, scopes and grants it accepts ([Sign-in, sessions, and tokens](/cloud/concepts/sign-in-sessions-and-tokens/)).

**Build metadata:** Registered in this build. Registration describes the default dispatcher in this build. It does not guarantee that a caller has the required credential or grant, that a tool is listed for that connection, or that the required service is configured.

## Contract description

Read the fields of one of your stored files: its size, content type, times, acting identity, and version\. The version is the value a metadata read returns as its ETag\. The content is never returned\. Pass `environment` to choose the partition, the application's deploy target where absent\.

## More about this action

If the application ID is missing from your account, the call returns HTTP 404 with `no_such_application`\. Check the ID in `list_applications`\.

## Access and action metadata

```json
{
  "name": "read_storage_file",
  "resource": "environment",
  "tier": "observe",
  "surface": "tzcloud",
  "addresses": [
    "tzop"
  ],
  "product": "cloud",
  "clients": [
    "bearer",
    "browser_session"
  ],
  "listing": "admitted",
  "summary": "Read one stored file's fields in a declared area bound to the given application. `environment` selects the partition, by default the application's deploy target, where an upload with no environment writes. The fields are its name, size, content type, creation and last-write times, acting identity and version, the storage metadata read's ETag. No content is returned; download through the storage routes. An absent file refuses `no_such_file`, an undeclared area `undeclared_area`, and another application's or the platform's deploy area `area_scope_refused`.",
  "annotations": {
    "readOnlyHint": true,
    "destructiveHint": false,
    "openWorldHint": false,
    "idempotentHint": true
  }
}
```

## MCP catalog entry

```json
{
  "name": "read_storage_file",
  "title": "Read stored file details",
  "tier": "observe",
  "scenario": "OST-L0-02",
  "summary": "Read the fields of one of your stored files: its size, content type, times, acting identity, and version. The version is the value a metadata read returns as its ETag. The content is never returned. Pass `environment` to choose the partition, the application's deploy target where absent.",
  "owners": [
    "OST-L0-02",
    "OST-L0-03",
    "STO-04"
  ]
}
```

## request

| JSON pointer | Description and constraints |
|---|---|
| "" \(root\) | Type: object<br>Required fields: \["application","area","name"\] |
| /<wbr>properties/<wbr>application | The id of the application whose area holds the file, from `list_applications`\. The area must be bound to it\.<br><br>Type: string |
| /<wbr>properties/<wbr>environment | The environment whose partition of the area holds the file; absent, the application's deploy target, where an upload naming none writes\.<br><br>Type: string<br>Pattern: ^\(development\|production\)$ |
| /<wbr>properties/<wbr>area | The declared storage area holding the file; an area the account has not declared is refused `undeclared_area`, and one bound to another application `area_scope_refused`\.<br><br>Type: string<br>Pattern: ^\[a\-zA\-Z0\-9\]\[a\-zA\-Z0\-9\_\-\]\{0,63\}$ |
| /<wbr>properties/<wbr>name | The file's name within the area, verbatim, slashes included; a name holding a `.` or `..` segment is refused\.<br><br>Type: string<br>Minimum length: 1 |

## response

| JSON pointer | Description and constraints |
|---|---|
| "" \(root\) | Type: object<br>Required fields: \["contract\_version","file"\] |
| /<wbr>properties/<wbr>contract\_version | Required value: 1 |
| /<wbr>properties/<wbr>reference | The short reference the platform recorded your call under: ten lowercase hexadecimal characters, the value in the call’s record row\. Quote it when you report the call\.<br><br>Type: string<br>Pattern: ^\[0\-9a\-f\]\{10\}$ |
| /<wbr>properties/<wbr>file | The file's fields as the storage metadata read returns them, never its content; `version` is the read's ETag\.<br><br>Type: object<br>Required fields: \["name","area","size","content\_type","created\_at","last\_written\_at","actor","version"\] |
| /<wbr>properties/<wbr>file/<wbr>properties/<wbr>name | Type: string |
| /<wbr>properties/<wbr>file/<wbr>properties/<wbr>area | Type: string |
| /<wbr>properties/<wbr>file/<wbr>properties/<wbr>size | Type: integer |
| /<wbr>properties/<wbr>file/<wbr>properties/<wbr>content\_type | Type: string |
| /<wbr>properties/<wbr>file/<wbr>properties/<wbr>created\_at | Type: string |
| /<wbr>properties/<wbr>file/<wbr>properties/<wbr>last\_written\_at | Type: string |
| /<wbr>properties/<wbr>file/<wbr>properties/<wbr>actor | Type: string |
| /<wbr>properties/<wbr>file/<wbr>properties/<wbr>version | Type: string |
| /<wbr>properties/<wbr>detail | Type: string |

## Complete payload contract

```json
{
  "request": {
    "type": "object",
    "required": [
      "application",
      "area",
      "name"
    ],
    "properties": {
      "application": {
        "type": "string",
        "description": "The id of the application whose area holds the file, from `list_applications`. The area must be bound to it."
      },
      "environment": {
        "type": "string",
        "pattern": "^(development|production)$",
        "description": "The environment whose partition of the area holds the file; absent, the application's deploy target, where an upload naming none writes."
      },
      "area": {
        "type": "string",
        "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$",
        "description": "The declared storage area holding the file; an area the account has not declared is refused `undeclared_area`, and one bound to another application `area_scope_refused`."
      },
      "name": {
        "type": "string",
        "minLength": 1,
        "description": "The file's name within the area, verbatim, slashes included; a name holding a `.` or `..` segment is refused."
      }
    }
  },
  "response": {
    "type": "object",
    "required": [
      "contract_version",
      "file"
    ],
    "properties": {
      "contract_version": {
        "const": 1
      },
      "reference": {
        "type": "string",
        "pattern": "^[0-9a-f]{10}$",
        "description": "The short reference the platform recorded your call under: ten lowercase hexadecimal characters, the value in the call’s record row. Quote it when you report the call."
      },
      "file": {
        "type": "object",
        "description": "The file's fields as the storage metadata read returns them, never its content; `version` is the read's ETag.",
        "required": [
          "name",
          "area",
          "size",
          "content_type",
          "created_at",
          "last_written_at",
          "actor",
          "version"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "area": {
            "type": "string"
          },
          "size": {
            "type": "integer"
          },
          "content_type": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "last_written_at": {
            "type": "string"
          },
          "actor": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        }
      },
      "detail": {
        "type": "string"
      }
    }
  }
}
```

## Shared contracts

- [Refusals](/cloud/reference/refusals/): every refusal, by surface, with its cause and its remedy
- [schemas/wire\_error\.schema\.json](/cloud/reference/sources/schemas/wire-error-schema/)
- [schemas/wire\_errors\.json](/cloud/reference/sources/schemas/wire-errors/)
- [schemas/action\_payloads\.json](/cloud/reference/sources/schemas/action-payloads/) (includes shared shapes)
- [management\_api\_contract\.md](/cloud/reference/sources/management-api-contract/)
