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

to_dict() — anthropic-sdk-python Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  86ab3662_ef11_c92a_de9a_3fb5c882ec44["to_dict()"]
  a0c776a7_63ce_9752_6068_14794f180e7d["BetaAsyncAbstractMemoryTool"]
  86ab3662_ef11_c92a_de9a_3fb5c882ec44 -->|defined in| a0c776a7_63ce_9752_6068_14794f180e7d
  04df7c29_dc8a_3bf6_2706_4e4ef3292a71["to_dict()"]
  04df7c29_dc8a_3bf6_2706_4e4ef3292a71 -->|calls| 86ab3662_ef11_c92a_de9a_3fb5c882ec44
  04df7c29_dc8a_3bf6_2706_4e4ef3292a71["to_dict()"]
  86ab3662_ef11_c92a_de9a_3fb5c882ec44 -->|calls| 04df7c29_dc8a_3bf6_2706_4e4ef3292a71
  style 86ab3662_ef11_c92a_de9a_3fb5c882ec44 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/anthropic/lib/tools/_beta_builtin_memory_tool.py lines 172–178

    def to_dict(self) -> BetaMemoryTool20250818Param:
        param: BetaMemoryTool20250818Param = {"type": "memory_20250818", "name": "memory"}

        if self._cache_control is not None:
            param["cache_control"] = self._cache_control

        return param

Subdomains

Calls

Called By

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free