Misc WebDAV Tool

Parent: Misc tools index

Status 2026-10-12: deployed on gravlax as part of Misc 2.0.0 (origin/m c0b4fec). Offline suite: 154 passed, 16 version-specific skips. First live testing was done the same day (PROPFIND, HEAD and DELETE with If-Match); results and follow-ups are at the end of this note.

Tool: webdav(method, path, destination?, body?, body_base64?, headers?, response_encoding?). Methods: GET, HEAD, OPTIONS, PUT, DELETE, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK. Requests go directly to https://webdav.critchley.biz, never through the /z davfs mount.

Authentication: the account running misc-mcp-server needs an explicit machine webdav.critchley.biz login/password entry in its ~/.netrc. Credentials are read on each call and are never tool arguments. No default netrc entry is used. Existing OAuth still protects access to the misc connector. Requires httpx alongside existing server dependencies.

path is an unescaped server path (for example /writeback/a file.txt), or a same-host HTTPS URL with URL escaping. Query strings and fragments are not accepted in URLs. Other hosts, userinfo, non-HTTPS URLs, backslashes and dot segments are rejected. Redirects are returned, never followed. destination uses the same path rules and is required for COPY/MOVE; Overwrite defaults to F.

body is UTF-8 text, including WebDAV XML for PROPPATCH/LOCK; body_base64 supplies binary file content. Supply at most one. PUT with neither creates/replaces an empty file. PROPFIND defaults to Depth: 1 and allprop XML when no body is supplied. MKCOL makes a collection (parents must already exist). DELETE may delete collections and their contents according to server semantics.

Permitted headers: Content-Type, Depth, Overwrite, If, If-Match, If-None-Match, Lock-Token, Timeout, Range. To avoid overwriting on PUT, use If-None-Match: *. To edit conditionally, first read the ETag and use If-Match. To release a lock, use UNLOCK with Lock-Token. If is available for lock/state conditions.

Returns a JSON object: status, ok, selected response headers, encoding and body. response_encoding is text (default, UTF-8) or base64. Non-UTF-8 responses automatically use base64. XML remains raw XML; a 207 Multi-Status response can contain individual failures, so inspect each resource/property status. HTTP errors and redirects retain their actual status/body. Transport/configuration errors return ok:false with a redacted error type.

Request and decoded response bodies are limited to 8 MiB. Larger GET downloads can use Range and inspect Content-Range. Network timeout: 30 seconds per HTTP operation. Writes are never automatically retried. After a timeout, inspect the remote state before repeating a write. Verify a successful upload with HEAD/GET on the server.

{
  "method": "PROPFIND",
  "path": "/writeback/",
  "headers": {
    "Depth": "1"
  }
}
{
  "method": "PUT",
  "path": "/writeback/example.txt",
  "body": "Example content\n",
  "headers": {
    "Content-Type": "text/plain; charset=utf-8",
    "If-None-Match": "*"
  }
}
{
  "method": "MOVE",
  "path": "/writeback/example.txt",
  "destination": "/writeback/renamed.txt"
}

misc_webdav.py exports TOOL_SCHEMA and call(arguments); misc_mcp_server.py registers and dispatches webdav and advertises version 2.0.0. test_misc_webdav.py was retained.

Deployment, verification and source synchronisation record (2026-10-12): Misc reconciliation and deployment record. Current version 2.0.0; GitHub origin/m commit c0b4fec.

Live test 2026-10-12

Run by Claude at John's request against the deployed 2.0.0 server. Results:

Not yet live-tested: GET (including Range and base64), PUT with If-None-Match, MKCOL, COPY, MOVE, LOCK/UNLOCK and PROPPATCH. Follow-up items are in misc-server/todo.

version 3  ·  created 2026-10-11  ·  updated 2026-10-12  ·  tags misc-server, webdav