From dd2e6c4886d83c33514a034895e8eee8742a325f Mon Sep 17 00:00:00 2001 From: Ryan Malloy Date: Fri, 2 Oct 2026 02:06:56 -0600 Subject: [PATCH] Pass area names to the file tools, not resolved areas list_dir and fetch take a name and resolve it themselves; the tools layer resolved it first and handed over the object, so every call failed with 'No FTP area named Area(...)'. Found by calling the tool for real. --- src/mcbebop/tools/files.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mcbebop/tools/files.py b/src/mcbebop/tools/files.py index 81c35b1..219d789 100644 --- a/src/mcbebop/tools/files.py +++ b/src/mcbebop/tools/files.py @@ -47,7 +47,7 @@ def register(mcp: FastMCP, settings: Settings) -> None: through this tool. """ host = _host(settings) - entries = await asyncio.to_thread(ftp.list_dir, ftp.resolve_area(area), path, host=host) + entries = await asyncio.to_thread(ftp.list_dir, area, path, host=host) return [FileEntry(name=e.name, size=e.size, is_dir=e.is_dir) for e in entries] @mcp.tool(annotations={"readOnlyHint": True, "openWorldHint": True}) @@ -61,7 +61,7 @@ def register(mcp: FastMCP, settings: Settings) -> None: host = _host(settings) dest = await asyncio.to_thread( ftp.fetch, - ftp.resolve_area(area), + area, path, host=host, capture_dir=settings.capture_dir,