# create_storage_folder

Source: https://modulify.ai/docs/mcp/storage/create-storage-folder

Creates an empty folder in a site's storage bucket, so files can be organized before they are uploaded.

- Title: Create a storage folder
- Scope: `data:write`
- Access: Makes changes

Pass `visibility` to set what files uploaded into it later default to. When it is left out, a new folder follows its parent, or the site default at the top level. The response reports the default the folder ended up with.

Only the last path segment of the name is kept, so a name containing slashes silently loses everything before the final one, and a name of `.`, `..` or nothing but slashes is refused. Put the parent in `path` instead. A folder is kept as a `.modulify-keep` file inside it, so that name is refused, and so is a folder whose path and name together are longer than 1001 bytes.

Creating a folder that already exists leaves its contents where they are. Without `visibility` it keeps the default it already has, and with `visibility` only the default for files uploaded later changes, so use `set_storage_visibility` to move the files already inside.

A folder inside the `CMS` folder at the top level, or the `CMS` folder itself, is refused with a `403` and `The CMS folder holds the files of your CMS items, so it cannot be changed from storage. Add files from a CMS field, and they are deleted with their item!` The CMS manages that folder, and a CMS file is deleted with the item that uses it. See [The CMS folder](https://modulify.ai/docs/data/storage#the-cms-folder).

While a storage backup is being restored, the call is refused with a `409` and `Your storage is being restored from a backup. Try again when the restore finishes!` See [While a restore runs](https://modulify.ai/docs/editor/backups#while-a-restore-runs).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `projectId` | string | Yes | The site id. |
| `path` | string | No | The parent folder to create it in. Leave it out or pass an empty string for the top level of the bucket. |
| `name` | string | Yes | The name of the new folder, without any slashes. |
| `visibility` | string | No | The default for files uploaded into the folder later, `public` or `private`. Leave it out to keep the default of a folder that already exists, or to inherit from the parent folder for a new one. |