HostContract#
- class ansys.fluent.mcp.common.host.HostContract(hint_lookup: Callable[[str], dict[str, bool] | None] = annotations_for, *, coordinator: operations.CallCoordinator | None = None)#
Wrap tool functions with trace ids, timeout-safe execution and error guidance.
Overview#
Return |
Import detail#
from ansys.fluent.mcp.common.host import HostContract
Method detail#
- HostContract.wrap(tool: str, fn: Callable[..., Any]) Callable[..., Any]#
Return
fnwrapped with the host contract.The wrapper keeps
fn’s signature (functools.wraps), so the MCP framework derives the same input schema.- Parameters:
- tool
str Registered tool name.
- fn
Callable[…,Any] Tool function, sync or async.
- tool
- Returns:
Callable[…,Any]The wrapped tool function.