AgentPrismToolRegistration
AgentPrism.Abstractions.dllA single tool registered with dependency injection. AgentPrism builds the tool registry from these registrations.
public sealed class AgentPrismToolRegistrationInheritance
Section titled “Inheritance”object ← AgentPrismToolRegistration
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”The consumer can also register tools from their own DI modules:
services.AddSingleton(new AgentPrismToolRegistration(myFunction));Constructors
Section titled “Constructors”AgentPrismToolRegistration(AIFunctionDeclaration, bool, string?, ToolEffect, string?, TimeSpan?)
Section titled “ AgentPrismToolRegistration(AIFunctionDeclaration, bool, string?, ToolEffect, string?, TimeSpan?)”Creates a new tool registration.
public AgentPrismToolRegistration(AIFunctionDeclaration function, bool requiresApproval = false, string? source = null, ToolEffect effect = ToolEffect.Read, string? requiredPermission = null, TimeSpan? timeout = null)Parameters
Section titled “Parameters”function AIFunctionDeclaration
The tool to register. An AI.AIFunction runs on the server;
an AI.AIFunctionDeclaration that is not an
AI.AIFunction (declaration-only, produced by
AddClientTool) runs on the caller instead.
requiresApproval bool
Whether explicit approval is required before the call.
function must be an AI.AIFunction when
this is true — approval defers a server-side call;
a client-side tool has no server-side body to approve.
source string?
The tool’s source. null for tools defined in code; the server name for tools coming from a remote MCP server.
effect ToolEffect
The tool’s effect class. Defaults to ToolEffect.Read.
requiredPermission string?
The permission name a caller must hold to call this tool, or null to declare none.
timeout TimeSpan?
The longest duration this tool’s call may run, or null to use the installation default.
Exceptions
Section titled “Exceptions”function is null.
Properties
Section titled “Properties”Effect
Section titled “ Effect”The tool’s effect class.
public ToolEffect Effect { get; }Property Value
Section titled “Property Value”Function
Section titled “ Function”The registered tool.
public AIFunctionDeclaration Function { get; }Property Value
Section titled “Property Value”AIFunctionDeclaration
RequiredPermission
Section titled “ RequiredPermission”The permission name a caller must hold to call this tool, or null when the tool declares none.
public string? RequiredPermission { get; }Property Value
Section titled “Property Value”RequiresApproval
Section titled “ RequiresApproval”Whether explicit approval is required before the call.
public bool RequiresApproval { get; }Property Value
Section titled “Property Value”Source
Section titled “ Source”The tool’s source. null for tools defined in code.
public string? Source { get; }Property Value
Section titled “Property Value”Timeout
Section titled “ Timeout”The longest duration this tool’s call may run, or null to use the installation default.
public TimeSpan? Timeout { get; }