ToolDescriptor
AgentPrism.Abstractions.dllThe UI-facing definition of a tool registered in code. The agent editor shows a selection from this list; it does not accept free-text input.
public sealed record ToolDescriptor : IEquatable<ToolDescriptor>Inheritance
Section titled “Inheritance”Implements
Section titled “Implements”Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
Section titled “Constructors”ToolDescriptor()
Section titled “ ToolDescriptor()”public ToolDescriptor()Properties
Section titled “Properties”Description
Section titled “ Description”The description that lets the model understand when to call the tool.
public string? Description { get; init; }Property Value
Section titled “Property Value”Effect
Section titled “ Effect”The tool’s effect class. Defaults to ToolEffect.Read.
public ToolEffect Effect { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Information, not a gate — see ToolEffect. An MCP-sourced tool defaults to ToolEffect.External instead: its definition lives on a remote server and can change, so the most cautious class is the honest default.
JsonSchema
Section titled “ JsonSchema”The arguments’ JSON schema.
public string? JsonSchema { get; init; }Property Value
Section titled “Property Value”The tool name. Used in agent definitions.
public required string Name { get; init; }Property Value
Section titled “Property Value”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; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Passed to IToolAuthorizationHandler as-is; AgentPrism does not resolve or validate its meaning.
RequiresApproval
Section titled “ RequiresApproval”Whether explicit approval is required before the call.
public bool RequiresApproval { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”If true, the compiler wraps the tool with
ApprovalRequiredAIFunction; Microsoft Agent Framework produces a
ToolApprovalRequestContent instead of running the tool, and the
call waits for the user’s approval.
RunsOnClient
Section titled “ RunsOnClient”Whether the tool’s body runs on the caller (typically a browser) instead of on the server.
public bool RunsOnClient { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”A client-side tool (AddClientTool) is registered as a
declaration only: the model can call it, but the server never runs
it. The caller must send the result back via
AgentRunRequest.ToolResults for the run to continue.
Source
Section titled “ Source”The tool’s source. null for tools defined in code; the server name for tools coming from a remote MCP server.
public string? Source { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”The UI shows this field as a separate badge: the tool definition lives not in code but on a remote server, and that server may change the definition.
Timeout
Section titled “ Timeout”The longest duration this tool’s call may run, or null
to use the installation default (AgentPrismOptions.Tools.DefaultTimeout).
public TimeSpan? Timeout { get; init; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Equals(object?)
Section titled “ Equals(object?)”public override bool Equals(object? obj)Parameters
Section titled “Parameters”obj object?
Returns
Section titled “Returns”Equals(ToolDescriptor?)
Section titled “ Equals(ToolDescriptor?)”public bool Equals(ToolDescriptor? other)Parameters
Section titled “Parameters”other ToolDescriptor?
Returns
Section titled “Returns”GetHashCode()
Section titled “ GetHashCode()”public override int GetHashCode()Returns
Section titled “Returns”ToString()
Section titled “ ToString()”public override string ToString()Returns
Section titled “Returns”Operators
Section titled “Operators”operator ==(ToolDescriptor?, ToolDescriptor?)
Section titled “ operator ==(ToolDescriptor?, ToolDescriptor?)”public static bool operator ==(ToolDescriptor? left, ToolDescriptor? right)Parameters
Section titled “Parameters”left ToolDescriptor?
right ToolDescriptor?
Returns
Section titled “Returns”operator !=(ToolDescriptor?, ToolDescriptor?)
Section titled “ operator !=(ToolDescriptor?, ToolDescriptor?)”public static bool operator !=(ToolDescriptor? left, ToolDescriptor? right)Parameters
Section titled “Parameters”left ToolDescriptor?
right ToolDescriptor?