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

Function _tool_use

tests/lib/tools/test_session_runner.py:71–80  ·  view source on GitHub ↗
(
    id: str,
    name: str,
    input: dict[str, Any],
    *,
    evaluated_permission: str | None = None,
)

Source from the content-addressed store, hash-verified

69
70
71def _tool_use(
72 id: str,
73 name: str,
74 input: dict[str, Any],
75 *,
76 evaluated_permission: str | None = None,
77) -> _StubEvent:
78 # ``evaluated_permission`` is always present on the real (typed) event —
79 # ``None`` unless the server evaluated a permission policy for the call.
80 return _StubEvent("agent.tool_use", id=id, name=name, input=input, evaluated_permission=evaluated_permission)
81
82
83def _tool_result(tool_use_id: str) -> _StubEvent:

Calls 1

_StubEventClass · 0.85

Tested by

no test coverage detected