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

Function error_of

tests/lib/tools/test_agent_toolset.py:966–969  ·  view source on GitHub ↗
(tool: Any, **input: object)

Source from the content-addressed store, hash-verified

964
965
966async def error_of(tool: Any, **input: object) -> str:
967 with pytest.raises(ToolError) as exc_info:
968 await tool.call(input)
969 return cast(str, exc_info.value.content)
970
971
972async def result_of(tool: Any, **input: object) -> tuple[str, bool]:

Calls 1

callMethod · 0.45

Tested by

no test coverage detected