Backplane.AiProtocol.ToolCall (backplane_ai_protocol v0.7.0)

Copy Markdown

Canonical tool invocation identity and argument provenance.

raw_arguments preserves provider bytes or structured input. validated_arguments is filled only by a separately validated path; it must not be treated as execution authorization.

Summary

Types

raw_arguments()

@type raw_arguments() :: {:json, binary()} | {:structured, structured_arguments()}

structured_arguments()

@type structured_arguments() :: map()

t()

@type t() :: %Backplane.AiProtocol.ToolCall{
  id: String.t(),
  name: String.t(),
  native_id: String.t() | nil,
  raw_arguments: raw_arguments(),
  validated_arguments: term() | nil
}

Functions

new(call)

@spec new(map()) :: {:ok, t()} | {:error, Backplane.AiProtocol.Error.t()}

put_validated_arguments(call, value)

@spec put_validated_arguments(t(), term()) ::
  {:ok, t()} | {:error, Backplane.AiProtocol.Error.t()}