MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / __init__

Method __init__

tests/lib/tools/test_session_runner.py:254–264  ·  view source on GitHub ↗
(
        self,
        name: str,
        fn: Callable[[dict[str, Any]], Awaitable[Any]],
        *,
        close: Callable[[], Any] | None = None,
    )

Source from the content-addressed store, hash-verified

252
253class _FakeTool:
254 def __init__(
255 self,
256 name: str,
257 fn: Callable[[dict[str, Any]], Awaitable[Any]],
258 *,
259 close: Callable[[], Any] | None = None,
260 ) -> None:
261 self.name = name
262 self._fn = fn
263 if close is not None:
264 self.close = close
265
266 def call(self, input: dict[str, Any]) -> Any:
267 return self._fn(input)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected