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

Function refuse

tests/lib/tools/toolsets/test_refusals.py:139–140  ·  view source on GitHub ↗
(context: BetaConfirmContext)

Source from the content-addressed store, hash-verified

137 raise ToolError(f"blocked: {url}")
138
139 def refuse(context: BetaConfirmContext) -> bool:
140 raise ToolError("declined: " + "c" * 5000)
141
142 url = "https://example.com/" + "a" * 5000
143 cases: list[tuple[FakeBrowser, str, Any, str]] = [

Calls 1

ToolErrorClass · 0.90

Tested by

no test coverage detected