struct

Anthropic::MemoryTool

Inherits JSON::Serializable < Anthropic::ServerTool < JSON::Serializable < Struct < Value < Object

Memory tool - allows Claude to store and retrieve information across conversations

A server-side tool for persistent memory management.

message = client.messages.create(
  model: Anthropic::Model::CLAUDE_SONNET_4_6,
  max_tokens: 4096,
  server_tools: [Anthropic::MemoryTool.new],
  messages: [{role: "user", content: "Remember that my favorite color is blue"}]
)

Constructors

new(pull : JSON::PullParser)

Memory tool - allows Claude to store and retrieve information across conversations

A server-side tool for persistent memory management.

message = client.messages.create(
  model: Anthropic::Model::CLAUDE_SONNET_4_6,
  max_tokens: 4096,
  server_tools: [Anthropic::MemoryTool.new],
  messages: [{role: "user", content: "Remember that my favorite color is blue"}]
)
Source
new(allowed_callers : Array(String) | Nil = nil, cache_control : CacheControl | Nil = nil, defer_loading : Bool | Nil = nil, input_examples : Array(JSON::Any) | Nil = nil, strict : Bool | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

allowed_callers
Source
cache_control
Source
defer_loading
Source
input_examples
Source
name
Source
strict
Source
type
Source