Home / Function/ call() — anthropic-sdk-python Function Reference

call() — anthropic-sdk-python Function Reference

Architecture documentation for the call() function in _beta_functions.py from the anthropic-sdk-python codebase.

Entity Profile

Dependency Diagram

graph TD
  dd1c8c22_ca06_011a_9ac9_782af6af7e66["call()"]
  67951991_8e94_eb92_6283_43e8d4a4c89f["BetaAsyncFunctionTool"]
  dd1c8c22_ca06_011a_9ac9_782af6af7e66 -->|defined in| 67951991_8e94_eb92_6283_43e8d4a4c89f
  685e05ef_3a4c_58b1_2146_7defe2c5a8a6["call()"]
  dd1c8c22_ca06_011a_9ac9_782af6af7e66 -->|calls| 685e05ef_3a4c_58b1_2146_7defe2c5a8a6
  style dd1c8c22_ca06_011a_9ac9_782af6af7e66 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/anthropic/lib/tools/_beta_functions.py lines 192–202

    async def call(self, input: object) -> BetaFunctionToolResultType:
        if not iscoroutinefunction(self.func):
            raise RuntimeError("Cannot call a synchronous function asynchronously. Use `@tool` instead.")

        if not is_dict(input):
            raise TypeError(f"Input must be a dictionary, got {type(input).__name__}")

        try:
            return await self._func_with_validate(**cast(Any, input))
        except pydantic.ValidationError as e:
            raise ValueError(f"Invalid arguments for function {self.name}") from e

Subdomains

Calls

Frequently Asked Questions

What does call() do?
call() is a function in the anthropic-sdk-python codebase, defined in src/anthropic/lib/tools/_beta_functions.py.
Where is call() defined?
call() is defined in src/anthropic/lib/tools/_beta_functions.py at line 192.
What does call() call?
call() calls 1 function(s): call.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free