veryfront__update_fileAccess
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
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "veryfront__update_file",
"arguments": {}
}
}
Result
The published output shape is summarized below. Inspect both the MCP response content andisError 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
{
"type": "object",
"properties": {
"project_reference": {
"type": "string",
"description": "Project ID or slug"
},
"ref": {
"type": "string",
"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."
},
"branch_id": {
"type": "string",
"description": "Legacy branch name or ID alias for ref=branch:<value>. Omit for main."
},
"file_path": {
"type": "string",
"description": "Path of the file. Send file_path or path, not two different values."
},
"path": {
"type": "string",
"description": "File path"
},
"content": {
"type": "string",
"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."
},
"str_replace": {
"type": "object",
"properties": {
"old_string": {
"type": "string",
"minLength": 1,
"description": "Exact current text. It must match exactly once."
},
"new_string": {
"type": "string",
"description": "Replacement text. Use an empty string to delete the matched text."
}
},
"required": [
"old_string",
"new_string"
],
"additionalProperties": false,
"description": "Replace one exact occurrence in the current file. Do not combine with content."
},
"expected_checksum": {
"type": "string",
"description": "Expected current checksum from get_file. Omission leaves full-content writes unguarded; string replacement uses the checksum read automatically."
},
"expected_version_id": {
"type": "string",
"description": "Expected current version ID from get_file. Omission leaves full-content writes unguarded; string replacement uses the version read automatically."
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Arguments for the update_file tool."
}
{
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "File path that was updated."
},
"id": {
"type": "string",
"description": "File ID."
},
"version_id": {
"type": "string",
"description": "Version ID the write produced."
},
"type": {
"type": "string",
"enum": [
"page",
"function",
"component",
"file"
],
"description": "File kind: page, function, component or file."
},
"size_bytes": {
"type": "number",
"description": "Size of the content encoded as UTF-8, in bytes."
},
"checksum": {
"type": [
"string",
"null"
],
"description": "SHA-256 content hash, or null when unavailable."
},
"updated_at": {
"type": "string",
"description": "Last content update time, RFC 3339."
}
},
"required": [
"path"
],
"additionalProperties": false,
"description": "Structured result returned by the update_file tool.",
"$schema": "http://json-schema.org/draft-07/schema#"
}