Skip to content

fix: correct async docstring example in BetaAsyncAbstractMemoryTool#1334

Open
muhammadrashid4587 wants to merge 1 commit intoanthropics:mainfrom
muhammadrashid4587:fix/async-memory-tool-docstring
Open

fix: correct async docstring example in BetaAsyncAbstractMemoryTool#1334
muhammadrashid4587 wants to merge 1 commit intoanthropics:mainfrom
muhammadrashid4587:fix/async-memory-tool-docstring

Conversation

@muhammadrashid4587
Copy link
Copy Markdown

Summary

Fixes the copy-pasted sync docstring example in BetaAsyncAbstractMemoryTool that would cause TypeError if followed verbatim:

  • Base class: BetaAbstractMemoryToolBetaAsyncAbstractMemoryTool
  • Methods: def view/createasync def view/create
  • Client: Anthropic()AsyncAnthropic()
  • Call: client.beta.messages.run_tools(...)await client.beta.messages.run_tools(...)

Fixes #1290

Test plan

  • Docstring-only change, no functional impact
  • Example now correctly demonstrates async usage pattern

The docstring example was copy-pasted from the sync class without
updating for async usage:
- Use BetaAsyncAbstractMemoryTool instead of BetaAbstractMemoryTool
- Use async def for method implementations
- Use AsyncAnthropic instead of Anthropic
- Use await for the client call

Fixes anthropics#1290
@muhammadrashid4587 muhammadrashid4587 requested a review from a team as a code owner April 5, 2026 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BetaAsyncAbstractMemoryTool docstring contains sync-only example (copy-paste from sync class)

2 participants