Copilot.Types.ToolResult (Copilot SDK v2.3.0)

Copy Markdown

Structured result of a tool invocation.

Can also be a plain string, which the SDK wraps into this struct automatically.

Summary

Functions

Serialize to the JSON-compatible map expected by the server.

Types

t()

@type t() :: %Copilot.Types.ToolResult{
  binary_results_for_llm: [Copilot.Types.ToolBinaryResult.t()] | nil,
  error: String.t() | nil,
  result_type: Copilot.Types.tool_result_type(),
  session_log: String.t() | nil,
  text_result_for_llm: String.t(),
  tool_telemetry: map() | nil
}

Functions

to_map(r)

@spec to_map(t()) :: map()

Serialize to the JSON-compatible map expected by the server.