Skip to main content

build_tool_call_request

Function build_tool_call_request 

Source
pub fn build_tool_call_request(
    invocation: &ToolInvocation,
    capability: CapabilityToken,
    agent_id: AgentId,
    server_id: ServerId,
) -> Result<ToolCallRequest, ProviderVerdictError>
Expand description

Build a ToolCallRequest from a fabric ToolInvocation plus the surrounding kernel context (capability token, calling agent, target tool server). All policy decisions remain with evaluate_tool_call*; this helper only translates the wire shape.

request_id defaults to invocation.provenance.request_id so the upstream provider’s request id flows into the kernel verdict and into the resulting receipt without a second round of bookkeeping.