Update file draft

veryfront__update_project_file_draft

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

FieldTypeRequiredDescription and constraints
project_referencestringNoProject ID or slug; defaults to the current project.
branch_referencestringNoBranch name or UUID. Omit for main; a missing selection is an error. Minimum length: 1.
pathstringYesSource-file path or UUID in the selected project/branch. Minimum length: 1.
contentstringYesFull pending file body. An empty string is valid.
expected_draft_versioninteger or nullNoExpected current draft sequence, not a committed version ID. 0 requires no prior draft; a stale value returns 409. Omit/null for an unconditional full-body replacement.

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.

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "veryfront__update_project_file_draft",
    "arguments": {
      "path": "example",
      "content": "example"
    }
  }
}

Result

The published output shape is summarized below. Inspect both the MCP response content and isError when handling a call.

FieldTypeRequiredDescription and constraints
file_idstringYesDeterministic source-file identity within the project. Format: uuid.
entity_typestringYesCanonical source-file type. Values: "page", "component", "function", "virtual_file".
versionintegerYesCurrent pending draft sequence; commit/discard resets the pending sequence to 0. Minimum: 1.
updated_atstringYesTimestamp of the current full-body draft snapshot.
pathstringYesCanonical source-file path, including when selected by UUID.
contentstringYesFull pending body, including an empty string.

Full schemas

json
{
  "type": "object",
  "properties": {
    "project_reference": {
      "type": "string",
      "description": "Project ID or slug; defaults to the current project."
    },
    "branch_reference": {
      "type": "string",
      "minLength": 1,
      "description": "Branch name or UUID. Omit for main; a missing selection is an error."
    },
    "path": {
      "type": "string",
      "minLength": 1,
      "description": "Source-file path or UUID in the selected project/branch."
    },
    "content": {
      "type": "string",
      "description": "Full pending file body. An empty string is valid."
    },
    "expected_draft_version": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 2147483647,
          "description": "Expected current draft sequence, not a committed version ID. 0 requires no prior draft; a stale value returns 409. Omit/null for an unconditional full-body replacement."
        },
        {
          "type": "null",
          "description": "Provide the expected draft version."
        }
      ],
      "description": "Expected current draft sequence, not a committed version ID. 0 requires no prior draft; a stale value returns 409. Omit/null for an unconditional full-body replacement."
    }
  },
  "required": [
    "path",
    "content"
  ],
  "additionalProperties": false,
  "description": "Arguments for the update_project_file_draft tool.",
  "$schema": "http://json-schema.org/draft-07/schema#"
}
json
{
  "type": "object",
  "properties": {
    "file_id": {
      "type": "string",
      "format": "uuid",
      "description": "Deterministic source-file identity within the project."
    },
    "entity_type": {
      "type": "string",
      "enum": [
        "page",
        "component",
        "function",
        "virtual_file"
      ],
      "description": "Canonical source-file type."
    },
    "version": {
      "type": "integer",
      "minimum": 1,
      "description": "Current pending draft sequence; commit/discard resets the pending sequence to 0."
    },
    "updated_at": {
      "type": "string",
      "description": "Timestamp of the current full-body draft snapshot."
    },
    "path": {
      "type": "string",
      "description": "Canonical source-file path, including when selected by UUID."
    },
    "content": {
      "type": "string",
      "description": "Full pending body, including an empty string."
    }
  },
  "required": [
    "file_id",
    "entity_type",
    "version",
    "updated_at",
    "path",
    "content"
  ],
  "additionalProperties": false,
  "description": "Structured result returned by the update_project_file_draft tool.",
  "$schema": "http://json-schema.org/draft-07/schema#"
}