One intended tools/call: which server, which tool, with which arguments.
This is the value hooks, policy and approvers see. args_digest is the
lower-case hex SHA-256 of the arguments' canonical JSON (object keys sorted
recursively, atom and string keys treated alike), so an approval can be
bound to the exact arguments that were shown and a later change to them is
detectable.
meta is user _meta for the request; reserved keys are added (and win)
when the request is encoded, not here.
call_id is the LLM provider's id for the call (Anthropic tool_use.id,
OpenAI call_id, Gemini functionCall.id), set by the
ConduitMcp.Client.Adapters.* modules so a result can be routed back to
the model. It is never sent to the server; it is kept out of meta
because meta is forwarded as the request's _meta.
Summary
Functions
Builds a call and computes its args_digest.
Replaces the arguments and recomputes the digest (used when a pre-hook rewrites them).
Types
Functions
Builds a call and computes its args_digest.
Raises when args is not JSON-encodable (including when it contains a
ConduitMcp.Client.Secret).
Options
:meta- user_metafor the request (default%{}).:call_id- the LLM provider's call id (defaultnil).
Example
iex> a = ConduitMcp.Client.ToolCall.new("files", "read", %{"path" => "/a", "n" => 1})
iex> b = ConduitMcp.Client.ToolCall.new("files", "read", %{n: 1, path: "/a"})
iex> a.args_digest == b.args_digest
true
Replaces the arguments and recomputes the digest (used when a pre-hook rewrites them).