From 161121b140bcb4b2e47c7aee1c32c565d672a3f7 Mon Sep 17 00:00:00 2001 From: Marcus van Elst Date: Tue, 14 Apr 2026 18:18:03 +0200 Subject: [PATCH] fix: search empty results + extract error 408 (v0.3.3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug 1 — search::start folder_path format (already fixed in 314fae9): json.dumps([path]) is confirmed correct per official Synology API docs and multiple independent implementations (N4S4/synology-api, kwent/syno). Poll-loop last-non-empty guard (if current_files:) is also in place. No further change needed for Bug 1. Bug 2 — extract::start wrong parameter key: The previous fix attempt renamed "file_path" → "path", which was wrong. Official API docs and independent implementations confirm the key is "file_path". The json.dumps() wrapping on file_path and dest_folder_path was already correct. Reverted the key rename. Co-Authored-By: Claude Sonnet 4.6 --- pyproject.toml | 2 +- src/mcp_synology_filestation/__init__.py | 2 +- src/mcp_synology_filestation/tools/filestation.py | 2 +- tests/test_tools_filestation.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 21f1165..a467910 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mcp-synology-filestation" -version = "0.3.2" +version = "0.3.3" description = "MCP server for Synology FileStation" requires-python = ">=3.12" dependencies = [ diff --git a/src/mcp_synology_filestation/__init__.py b/src/mcp_synology_filestation/__init__.py index 18f047a..9da8638 100644 --- a/src/mcp_synology_filestation/__init__.py +++ b/src/mcp_synology_filestation/__init__.py @@ -1,3 +1,3 @@ """MCP server for Synology FileStation.""" -__version__ = "0.3.2" +__version__ = "0.3.3" diff --git a/src/mcp_synology_filestation/tools/filestation.py b/src/mcp_synology_filestation/tools/filestation.py index fa36358..8dcfd36 100644 --- a/src/mcp_synology_filestation/tools/filestation.py +++ b/src/mcp_synology_filestation/tools/filestation.py @@ -845,7 +845,7 @@ def register_filestation( "start", version=2, params={ - "path": json.dumps(file_path), + "file_path": json.dumps(file_path), "dest_folder_path": json.dumps(dest_folder_path), "overwrite": "true" if overwrite else "false", "keep_dir": "true" if keep_dir else "false", diff --git a/tests/test_tools_filestation.py b/tests/test_tools_filestation.py index cdd6cf6..1a9bb6b 100644 --- a/tests/test_tools_filestation.py +++ b/tests/test_tools_filestation.py @@ -1353,7 +1353,7 @@ async def test_extract_success(config: AppConfig) -> None: assert start_call[0][1] == "start" assert start_call[1]["version"] == 2 p = start_call[1]["params"] - assert json.loads(p["path"]) == "/backup/archive.zip" + assert json.loads(p["file_path"]) == "/backup/archive.zip" assert json.loads(p["dest_folder_path"]) == "/data/extracted" assert p["overwrite"] == "false" assert p["keep_dir"] == "true"