Skip to content

Commit 955e0d3

Browse files
committed
fixes
1 parent a3fa1c9 commit 955e0d3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/agentlab/backends/browser/mcp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def call_tool(self, tool_name: str, arguments: dict) -> list[TextContent | Image
163163
return tool_result.content
164164

165165
def actions(self) -> tuple[ToolSpec]:
166-
return self._mcp.actions()
166+
return list(self._mcp.actions())
167167

168168
def close(self) -> None:
169169
self._mcp.close()

src/agentlab/backends/browser/mcp_playwright.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from PIL import Image
77
from tapeagents.tool_calling import ToolCallAction
88

9-
from agentlab.backends.browser.base import MCPBrowserBackend
9+
from agentlab.backends.browser.mcp import MCPBrowserBackend
1010

1111
logger = logging.getLogger(__name__)
1212

@@ -29,7 +29,7 @@ def run_js(self, js: str):
2929
return result_str
3030

3131
def step(self, action: ToolCallAction) -> dict:
32-
contents = self._call_mcp(action)
32+
contents = self.call_tool(action.function.name, action.function.arguments)
3333
logger.info(f"Step result has {len(contents)} contents")
3434
tool_result = "\n".join(
3535
[c.text for c in contents if c.type == "text" and "# Ran Playwright code" not in c.text]

0 commit comments

Comments
 (0)