Repository navigation
Commit e25ac1e
Hanzo AI
fix(browser): route MCP register through _result_to_mcp — ToolImage→ImageContent
The browser tool's bespoke register() returned execute()'s dict RAW, so FastMCP
flat-JSON-serialized a screenshot's ToolImage (base64 inline, 250K chars) →
overflowed the agent context and wedged the run — the SAME bug main's
ImageContent converter (c8dfb45) fixed for every OTHER tool via
BaseTool.register→_result_to_mcp, but the browser tool bypassed that path.
Now both registration paths share the one converter: nested ToolImage anywhere
in the result becomes a native MCP ImageContent block the client SEES. One way.1 parent 7d44d89 commit e25ac1e
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
2508 | 2509 | | |
2509 | 2510 | | |
2510 | 2511 | | |
2511 | | - | |
| 2512 | + | |
2512 | 2513 | | |
2513 | | - | |
| 2514 | + | |
| 2515 | + | |
| 2516 | + | |
| 2517 | + | |
| 2518 | + | |
2514 | 2519 | | |
2515 | 2520 | | |
2516 | 2521 | | |
| |||
2570 | 2575 | | |
2571 | 2576 | | |
2572 | 2577 | | |
| 2578 | + | |
2573 | 2579 | | |
2574 | 2580 | | |
2575 | 2581 | | |
| |||
0 commit comments