< Summary

Information
Class: NexusLabs.Needlr.AgentFramework.Iterative.ToolCallResult
Assembly: NexusLabs.Needlr.AgentFramework
File(s): /home/runner/work/needlr/needlr/src/NexusLabs.Needlr.AgentFramework/Iterative/ToolCallResult.cs
Line coverage
85%
Covered lines: 6
Uncovered lines: 1
Coverable lines: 7
Total lines: 40
Line coverage: 85.7%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
get_FunctionName()100%11100%
get_Arguments()100%11100%
get_Result()100%11100%
get_Duration()100%210%
get_Succeeded()100%11100%
get_ErrorMessage()100%11100%

File(s)

/home/runner/work/needlr/needlr/src/NexusLabs.Needlr.AgentFramework/Iterative/ToolCallResult.cs

#LineLine coverage
 1namespace NexusLabs.Needlr.AgentFramework.Iterative;
 2
 3/// <summary>
 4/// The result of executing a single tool call within an iteration of an
 5/// <see cref="IIterativeAgentLoop"/>.
 6/// </summary>
 7/// <remarks>
 8/// <para>
 9/// Tool call results are ephemeral — they are available via
 10/// <see cref="IterativeContext.LastToolResults"/> for exactly one iteration (the next one).
 11/// The prompt factory decides whether to embed them in the next prompt.
 12/// </para>
 13/// <para>
 14/// When a tool call fails (exception or unknown function), <see cref="Succeeded"/> is
 15/// <see langword="false"/> and <see cref="ErrorMessage"/> contains the failure reason.
 16/// The loop does not abort on tool failure — subsequent tool calls in the same response
 17/// are still executed.
 18/// </para>
 19/// </remarks>
 20/// <param name="FunctionName">The name of the tool/function that was called.</param>
 21/// <param name="Arguments">
 22/// The arguments the model provided for the tool call. Keys are parameter names;
 23/// values are the deserialized argument values.
 24/// </param>
 25/// <param name="Result">
 26/// The return value from the tool execution, or <see langword="null"/> if the tool
 27/// returned void or the call failed.
 28/// </param>
 29/// <param name="Duration">Wall-clock time for the tool execution.</param>
 30/// <param name="Succeeded">Whether the tool call completed without throwing.</param>
 31/// <param name="ErrorMessage">
 32/// The exception message if the tool call failed; <see langword="null"/> on success.
 33/// </param>
 16634public sealed record ToolCallResult(
 1135    string FunctionName,
 1636    IReadOnlyDictionary<string, object?> Arguments,
 11837    object? Result,
 038    TimeSpan Duration,
 12539    bool Succeeded,
 17440    string? ErrorMessage);