veryfront__update_file
Requires project.files.write.
Access
No external-service connection is required. Use a Veryfront credential with access to the requested resources.
Call type: Can change resources.
Arguments
| Field | Type | Required | Description and constraints |
|---|---|---|---|
project_reference | string | No | Project ID or slug |
ref | string | No | Content selector: main or branch:<name-or-id>. Omit for main. Release and environment snapshots are read-only. Supplied aliases must name the same content. |
branch_id | string | No | Legacy branch name or ID alias for ref=branch:<value>. Omit for main. |
file_path | string | No | Path of the file. Send file_path or path, not two different values. |
path | string | No | File path |
content | string | No | Replacement textual content in main or the selected branch, stored as a new immutable version. Source-file MIME type is not writable. Do not combine with str_replace. |
str_replace | object | No | Replace one exact occurrence in the current file. Do not combine with content. |
expected_checksum | string | No | Expected current checksum from get_file. Omission leaves full-content writes unguarded; string replacement uses the checksum read automatically. |
expected_version_id | string | No | Expected current version ID from get_file. Omission leaves full-content writes unguarded; string replacement uses the version read automatically. |
Example request
Send this JSON-RPC request through an initialized MCP client. Replace sample identifiers and values before calling the tool. See MCP client setup.
request.json
1{2 "jsonrpc": "2.0",3 "id": 1,4 "method": "tools/call",5 "params": {6 "name": "veryfront__update_file",7 "arguments": {}8 }9}Result
The published output shape is summarized below. Inspect both the MCP response content and isError when handling a call.
| Field | Type | Required | Description and constraints |
|---|---|---|---|
path | string | Yes | File path that was updated. |
id | string | No | File ID. |
version_id | string | No | Version ID the write produced. |
type | string | No | File kind: page, function, component or file. Values: "page", "function", "component", "file". |
size_bytes | number | No | Size of the content encoded as UTF-8, in bytes. |
checksum | string or null | No | SHA-256 content hash, or null when unavailable. |
updated_at | string | No | Last content update time, RFC 3339. |
Full schemas
input-schema.json
1{2 "type": "object",3 "properties": {4 "project_reference": {5 "type": "string",6 "description": "Project ID or slug"7 },8 "ref": {9 "type": "string",10 "description": "Content selector: main or branch:<name-or-id>. Omit for main. Release and environment snapshots are read-only. Supplied aliases must name the same content."11 },12 "branch_id": {13 "type": "string",14 "description": "Legacy branch name or ID alias for ref=branch:<value>. Omit for main."15 },16 "file_path": {17 "type": "string",18 "description": "Path of the file. Send file_path or path, not two different values."19 },20 "path": {21 "type": "string",22 "description": "File path"23 },24 "content": {25 "type": "string",26 "description": "Replacement textual content in main or the selected branch, stored as a new immutable version. Source-file MIME type is not writable. Do not combine with str_replace."27 },28 "str_replace": {29 "type": "object",30 "properties": {31 "old_string": {32 "type": "string",33 "minLength": 1,34 "description": "Exact current text. It must match exactly once."35 },36 "new_string": {37 "type": "string",38 "description": "Replacement text. Use an empty string to delete the matched text."39 }40 },41 "required": [42 "old_string",43 "new_string"44 ],45 "additionalProperties": false,46 "description": "Replace one exact occurrence in the current file. Do not combine with content."47 },48 "expected_checksum": {49 "type": "string",50 "description": "Expected current checksum from get_file. Omission leaves full-content writes unguarded; string replacement uses the checksum read automatically."51 },52 "expected_version_id": {53 "type": "string",54 "description": "Expected current version ID from get_file. Omission leaves full-content writes unguarded; string replacement uses the version read automatically."55 }56 },57 "additionalProperties": false,58 "$schema": "http://json-schema.org/draft-07/schema#",59 "description": "Arguments for the update_file tool."60}output-schema.json
1{2 "type": "object",3 "properties": {4 "path": {5 "type": "string",6 "description": "File path that was updated."7 },8 "id": {9 "type": "string",10 "description": "File ID."11 },12 "version_id": {13 "type": "string",14 "description": "Version ID the write produced."15 },16 "type": {17 "type": "string",18 "enum": [19 "page",20 "function",21 "component",22 "file"23 ],24 "description": "File kind: page, function, component or file."25 },26 "size_bytes": {27 "type": "number",28 "description": "Size of the content encoded as UTF-8, in bytes."29 },30 "checksum": {31 "type": [32 "string",33 "null"34 ],35 "description": "SHA-256 content hash, or null when unavailable."36 },37 "updated_at": {38 "type": "string",39 "description": "Last content update time, RFC 3339."40 }41 },42 "required": [43 "path"44 ],45 "additionalProperties": false,46 "description": "Structured result returned by the update_file tool.",47 "$schema": "http://json-schema.org/draft-07/schema#"48}