ToolApprovalContext
AgentPrism.Abstractions.dllThe tool call a code-defined approval policy judges. Read-only.
public sealed class ToolApprovalContextInheritance
Section titled “Inheritance”Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”Registered with IAgentPrismBuilder.AddToolApprovalPolicy(toolName, policy)
(AgentPrism.Core). A policy runs before the data rules
(ToolApprovalRule) and its decision, when not
ToolApprovalPolicyDecision.Undecided, overrides them — a policy is a
security boundary written in code, and data cannot loosen it.
Constructors
Section titled “Constructors”ToolApprovalContext()
Section titled “ ToolApprovalContext()”public ToolApprovalContext()Properties
Section titled “Properties”AgentName
Section titled “ AgentName”Gets the agent making the call, when known.
public string? AgentName { get; init; }Property Value
Section titled “Property Value”Arguments
Section titled “ Arguments”Gets the call’s arguments, keyed by parameter name.
public required IReadOnlyDictionary<string, object?> Arguments { get; init; }Property Value
Section titled “Property Value”IReadOnlyDictionary<string, object?>
TenantId
Section titled “ TenantId”Gets the tenant making the call.
public required string TenantId { get; init; }Property Value
Section titled “Property Value”ToolName
Section titled “ ToolName”Gets the tool being called.
public required string ToolName { get; init; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”GetNumber(string)
Section titled “ GetNumber(string)”Reads a number at a dotted path into ToolApprovalContext.Arguments (for example
order.amount). Returns null if the path does not
resolve or the value is not a number.
public double? GetNumber(string path)Parameters
Section titled “Parameters”path string
The dotted path. No array index is accepted.
Returns
Section titled “Returns”GetString(string)
Section titled “ GetString(string)”Reads text at a dotted path into ToolApprovalContext.Arguments (for example
customer.tier). Returns null if the path does not
resolve or the value is not text.
public string? GetString(string path)Parameters
Section titled “Parameters”path string
The dotted path. No array index is accepted.