# Update upload grants

Tool: `veryfront__update_upload_grants`

Replace the complete list of user grants on an upload or folder; an empty list revokes every grant. Requires project.uploads.admin.

## Arguments

| Name                | Type                  | Required | Description                                                                                                                                     |
| ------------------- | --------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `upload_path`       | string · min length 1 | Yes      | Upload UUID for grants on that upload, or an upload path or folder prefix resolved to the folder setting that governs it. Do not URL-encode it. |
| `grants`            | array of object       | Yes      | The complete replacement list. An empty list revokes every grant.                                                                               |
| `confirm`           | boolean               | Yes      | Must be true to confirm replacing the whole grant list; an empty list revokes every grant.                                                      |
| `project_reference` | string                |          | Project UUID, slug or configured domain; optional when the selected context supplies a project.                                                 |

## Responses

| Status | Description                                           |
| ------ | ----------------------------------------------------- |
| 200    | The tool ran; its output is result.structuredContent. |

## Call it

```bash
curl -X POST -N "https://api.veryfront.com/mcp" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Accept: application/json, text/event-stream" \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "veryfront__update_upload_grants",
    "arguments": {
      "upload_path": "string",
      "grants": [],
      "confirm": false
    }
  }
}'
```

## Example response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"data\":[{\"user_id\":\"string\",\"permission\":\"read\",\"created_at\":\"string\"}],\"resolved_path\":\"string\",\"resolved_type\":\"upload\",\"resolved_id\":\"string\"}"
      }
    ],
    "structuredContent": {
      "data": [
        {
          "user_id": "string",
          "permission": "read",
          "created_at": "string"
        }
      ],
      "resolved_path": "string",
      "resolved_type": "upload",
      "resolved_id": "string"
    }
  }
}
```
