.NET API
TraconToolRegistration
Tracon.Abstractions.dllA single tool registered with dependency injection. Tracon builds the tool registry from these registrations.
public sealed class TraconToolRegistrationInheritance
Section titled “Inheritance”object ← TraconToolRegistration
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 TraconToolRegistration(myFunction));Constructors
Section titled “Constructors”TraconToolRegistration(AIFunctionDeclaration, bool, string?, ToolEffect, string?, TimeSpan?, bool, int?)
Section titled “ TraconToolRegistration(AIFunctionDeclaration, bool, string?, ToolEffect, string?, TimeSpan?, bool, int?)”Creates a new tool registration.
public TraconToolRegistration(AIFunctionDeclaration function, bool requiresApproval = false, string? source = null, ToolEffect effect = ToolEffect.Read, string? requiredPermission = null, TimeSpan? timeout = null, bool safeToRepeat = false, int? maxOutputBytes = 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.
safeToRepeat bool
See TraconToolRegistration.SafeToRepeat. Defaults to false.
maxOutputBytes int?
The most bytes (UTF-8) this tool’s result may carry, 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
MaxOutputBytes
Section titled “ MaxOutputBytes”The most bytes (UTF-8) this tool’s result may carry, or null to use the installation default. A result over the limit is trimmed and handed to the model inside an envelope that states how many bytes were dropped.
public int? MaxOutputBytes { get; }Property Value
Section titled “Property Value”int?
Remarks
Section titled “Remarks”Bounding the output inside the tool’s own body is always better: the tool knows its data, this only counts bytes. This limit is the last defence for the day that bound is forgotten.
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”SafeToRepeat
Section titled “ SafeToRepeat”Whether this tool’s call may run again when an interrupted run is continued.
public bool SafeToRepeat { get; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”The default, false, is safe for every tool: a call this repository has no record of finishing is never repeated automatically. Continuation asks a stronger question than idempotency — not just “does the same call produce the same result?” but “may this call’s SIDE EFFECT legitimately happen a second time?” Only a tool whose author can answer yes to that should set this to true (typically by carrying its own idempotency key).
Only consulted for ToolEffect.Destructive and ToolEffect.External tools, which are otherwise refused for a continuation — setting this to true is how a tool author opts a specific irreversible or externally visible call back in. ToolEffect.Read and ToolEffect.Write calls are always safe to continue and never consult this flag.
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; }