Hostinger OpenClaw VPS

update_project_files

EDIT a deployed site — call get_project_files first, never edit from memory. PREFERRED: targeted edits ({ path, oldString, newString }) — you send only the changed text, and the server verifies oldString against the ACTUAL live file (exactly one match required), so a stale copy can never overwrite anything. Use files (full content) only for rewrites or new files, deletePaths for removals. Every file you do NOT name is guaranteed untouched — deletions never happen by omission. All-or-nothing: any failed match or invalid path rejects the whole patch with nothing changed. Text files only (HTML/CSS/JS) — images live in the Media Library. Single-file projects accept edits to their one file (path "/"); adding/deleting files is multi-file only.

Remote dplooyinc/hosting

Remote (network-hosted)

Other tools also called update_project_files? See providers with this name

Input Schema


            {
  "type": "object",
  "properties": {
    "edits": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "path",
          "oldString",
          "newString"
        ],
        "properties": {
          "path": {
            "type": "string",
            "description": "File path, e.g. '/' (single-file site), '/index.html', '/css/style.css'"
          },
          "newString": {
            "type": "string",
            "description": "The replacement text"
          },
          "oldString": {
            "type": "string",
            "description": "EXACT text currently in the live file, including whitespace/indentation — must match exactly once. Include surrounding lines to make it unique."
          }
        }
      },
      "description": "PREFERRED for changes: find-and-replace verified against the live file — costs only the changed text, never the whole file"
    },
    "files": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "path",
          "content"
        ],
        "properties": {
          "path": {
            "type": "string",
            "description": "File path, e.g. '/index.html' or '/css/style.css'. Existing paths are updated; new paths are created (multi-page projects only)."
          },
          "content": {
            "type": "string",
            "description": "The full new content of this file"
          }
        }
      },
      "description": "Full-content replacement — ONLY for complete rewrites or brand-new files; use edits for changes"
    },
    "projectId": {
      "type": "string",
      "description": "The project ID (from list_projects or get_project)"
    },
    "deletePaths": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Paths to remove from the site (multi-file projects only). The entry page can never be deleted."
    }
  }
}