Packages

Elixir client for the Anthropic Messages API — typed content blocks, native tool use, streaming, retries.

Current section

Files

Jump to
anthropic_community lib anthropic tools server_tool.ex
Raw

lib/anthropic/tools/server_tool.ex

defmodule Anthropic.Tools.ServerTool do
@moduledoc false
@spec build(map(), keyword()) :: map()
def build(base, opts) do
Enum.reduce(opts, base, fn
{_key, nil}, acc -> acc
{key, value}, acc -> Map.put(acc, key, value)
end)
end
end