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

Function _custom_tool_use

tests/lib/tools/test_session_runner.py:105–108  ·  view source on GitHub ↗

A CUSTOM (user-defined) tool call — the agent emits `agent.custom_tool_use` rather than `agent.tool_use` for these.

(id: str, name: str, input: dict[str, Any], *, session_thread_id: str | None = None)

Source from the content-addressed store, hash-verified

103
104
105def _custom_tool_use(id: str, name: str, input: dict[str, Any], *, session_thread_id: str | None = None) -> _StubEvent:
106 """A CUSTOM (user-defined) tool call — the agent emits `agent.custom_tool_use`
107 rather than `agent.tool_use` for these."""
108 return _StubEvent("agent.custom_tool_use", id=id, name=name, input=input, session_thread_id=session_thread_id)
109
110
111def _custom_tool_result(custom_tool_use_id: str) -> _StubEvent:

Calls 1

_StubEventClass · 0.85

Tested by

no test coverage detected