# Publish project files

Tool: `veryfront__publish_project_files`

Publish the files. Requires project.files.write.

## Arguments

| Name                  | Type            | Required | Description                                                                                              |
| --------------------- | --------------- | -------- | -------------------------------------------------------------------------------------------------------- |
| `project_reference`   | string          |          | Project ID or slug. Requires project.files.write.                                                        |
| `file_references`     | array of string |          | File paths or UUIDs. Omit to commit all pending changes; \[] commits none.                               |
| `branch_reference`    | string          |          | Branch name or UUID. Omit for main.                                                                      |
| `expected_version_id` | string · uuid   |          | Expected persisted version UUID; requires exactly one selected file.                                     |
| `expected_versions`   | object          |          | Map from file paths or UUIDs to their expected persisted version UUIDs. Conflicting guards are rejected. |

## 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__publish_project_files",
    "arguments": {}
  }
}'
```

## Example response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"success\":false,\"versions\":[{\"file_id\":\"00000000-0000-0000-0000-000000000000\",\"version_id\":\"00000000-0000-0000-0000-000000000000\",\"path\":\"string\"}],\"conflicts\":[{\"file_id\":\"00000000-0000-0000-0000-000000000000\",\"path\":\"string\",\"error\":\"string\"}],\"problem\":{\"status\":409,\"slug\":\"concurrency-error\",\"detail\":\"string\"}}"
      }
    ],
    "structuredContent": {
      "success": false,
      "versions": [
        {
          "file_id": "00000000-0000-0000-0000-000000000000",
          "version_id": "00000000-0000-0000-0000-000000000000",
          "path": "string"
        }
      ],
      "conflicts": [
        {
          "file_id": "00000000-0000-0000-0000-000000000000",
          "path": "string",
          "error": "string"
        }
      ],
      "problem": {
        "status": 409,
        "slug": "concurrency-error",
        "detail": "string"
      }
    }
  }
}
```
