Issue: Server tools cannot be reused in sampling contexts
Issue: Server tools cannot be reused in sampling contexts: a task in LegoFlow-SWE (Harbor dataset). Currently, FunctionTool and TransformedTool instances (created with @mcp.tool , for example) cannot be passed directly to sampling methods such as ctx.sample() or ctx.sample step() . If a server…
The task
Currently, `FunctionTool` and `TransformedTool` instances (created with `@mcp.tool`, for example) cannot be passed directly to sampling methods such as `ctx.sample()` or `ctx.sample_step()`. If a server defines tools using `@mcp.tool` and later needs them in a sampling workflow, the developer must manually recreate…
Part of Lego-X/LegoFlow-SWE.