openclaw_config_patch
Atomically replace the full OpenClaw gateway configuration with optimistic locking, using either a raw JSON and base hash or a convenience merge path and value.
Instructions
Optimistic-locked replace of the FULL gateway config (verified live against 2026.4.12+). Wraps config.patch. Wire format: { raw: string, baseHash: string } where raw is the full config serialized as JSON and baseHash comes from a previous openclaw_config_get call. Pass mergePath + mergeValue for the convenience flow: this tool will fetch the current config, deep-merge your value at the given dotted path, compute the resulting raw JSON, and submit it with the freshly-read baseHash. Destructive — replaces the entire config atomically.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw | No | Full new config as a JSON string. Use this when you've already serialized the new state. Mutually exclusive with mergePath/mergeValue. | |
| baseHash | No | Hash of the config the patch is based on. Required with `raw`. Get it from openclaw_config_get. | |
| instance | No | Optional OpenClaw instance to route this call to (e.g. 'default', 'work'). Falls back to the active default instance, or the OPENCLAW_GATEWAY_URL/TOKEN env vars when set. List configured instances with openclaw_setup_list. | |
| mergePath | No | Convenience: dotted path to merge `mergeValue` into. The tool fetches the current config and merges client-side. | |
| mergeValue | No | Convenience: object/value to deep-merge at `mergePath`. Any JSON-serializable value — passthrough, no schema enforced. |