diff --git a/pyproject.toml b/pyproject.toml index 1c4166a..21f1165 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mcp-synology-filestation" -version = "0.3.1" +version = "0.3.2" 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 29bb612..18f047a 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.1" +__version__ = "0.3.2" diff --git a/src/mcp_synology_filestation/tools/filestation.py b/src/mcp_synology_filestation/tools/filestation.py index 5a78335..fa36358 100644 --- a/src/mcp_synology_filestation/tools/filestation.py +++ b/src/mcp_synology_filestation/tools/filestation.py @@ -358,7 +358,7 @@ def register_filestation( "SYNO.FileStation.Search", "start", params={ - "folder_path": path, + "folder_path": json.dumps([path]), "recursive": "true" if recursive else "false", "pattern": pattern, }, @@ -845,7 +845,7 @@ def register_filestation( "start", version=2, params={ - "file_path": json.dumps(file_path), + "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 b18769a..cdd6cf6 100644 --- a/tests/test_tools_filestation.py +++ b/tests/test_tools_filestation.py @@ -463,7 +463,7 @@ async def test_search_success(config: AppConfig) -> None: start_call = client.request.call_args_list[0] assert start_call[0][0] == "SYNO.FileStation.Search" assert start_call[0][1] == "start" - assert start_call[1]["params"]["folder_path"] == "/docker" + assert json.loads(start_call[1]["params"]["folder_path"]) == ["/docker"] assert start_call[1]["params"]["pattern"] == "*.yaml" assert start_call[1]["params"]["recursive"] == "true" # Verify clean was called last @@ -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["file_path"]) == "/backup/archive.zip" + assert json.loads(p["path"]) == "/backup/archive.zip" assert json.loads(p["dest_folder_path"]) == "/data/extracted" assert p["overwrite"] == "false" assert p["keep_dir"] == "true"