Skip to content

ToolDescriptor

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

The 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>

objectToolDescriptor

IEquatable<ToolDescriptor>

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

public ToolDescriptor()

The description that lets the model understand when to call the tool.

public string? Description { get; init; }

string?

The tool’s effect class. Defaults to ToolEffect.Read.

public ToolEffect Effect { get; init; }

ToolEffect

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.

The arguments’ JSON schema.

public string? JsonSchema { get; init; }

string?

The tool name. Used in agent definitions.

public required string Name { get; init; }

string

The permission name a caller must hold to call this tool, or null when the tool declares none.

public string? RequiredPermission { get; init; }

string?

Passed to IToolAuthorizationHandler as-is; AgentPrism does not resolve or validate its meaning.

Whether explicit approval is required before the call.

public bool RequiresApproval { get; init; }

bool

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.

Whether the tool’s body runs on the caller (typically a browser) instead of on the server.

public bool RunsOnClient { get; init; }

bool

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.

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; }

string?

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.

The longest duration this tool’s call may run, or null to use the installation default (AgentPrismOptions.Tools.DefaultTimeout).

public TimeSpan? Timeout { get; init; }

TimeSpan?

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(ToolDescriptor? other)

other ToolDescriptor?

bool

public override int GetHashCode()

int

public override string ToString()

string

operator ==(ToolDescriptor?, ToolDescriptor?)

Section titled “ operator ==(ToolDescriptor?, ToolDescriptor?)”
public static bool operator ==(ToolDescriptor? left, ToolDescriptor? right)

left ToolDescriptor?

right ToolDescriptor?

bool

operator !=(ToolDescriptor?, ToolDescriptor?)

Section titled “ operator !=(ToolDescriptor?, ToolDescriptor?)”
public static bool operator !=(ToolDescriptor? left, ToolDescriptor? right)

left ToolDescriptor?

right ToolDescriptor?

bool