# IToolRegistry

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/api/tracon.itoolregistry/
> Summary: IToolRegistry: The registry of tools registered in code.

<div class="api-provenance">Namespace Tracon · Assembly <code>Tracon.Abstractions.dll</code></div>

The registry of tools registered in code.

```csharp
public interface IToolRegistry
```

## Remarks

Tracon's implementation and its invocation pipeline are a security boundary.
Do not implement or replace this service. Replacing it removes authorization,
timeout, approval, and output-truncation wrappers. Register a tool through an
`AddTool*` API instead. The registry is an immutable startup snapshot.

## Methods

### <a id="Tracon_IToolRegistry_List"></a> List\(\)

Returns the definitions of all registered tools, ordered by name.

```csharp
IReadOnlyList<ToolDescriptor> List()
```

#### Returns

 [IReadOnlyList](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist\-1)<[ToolDescriptor](/api/tracon.tooldescriptor/)\>

The tool definitions.

### <a id="Tracon_IToolRegistry_TryGet_System_String_Microsoft_Extensions_AI_AIFunctionDeclaration__"></a> TryGet\(string, out AIFunctionDeclaration?\)

Fetches the tool with the given name.

```csharp
bool TryGet(string name, out AIFunctionDeclaration? tool)
```

#### Parameters

`name` [string](https://learn.microsoft.com/dotnet/api/system.string)

The tool name. Comparison is case-sensitive.

`tool` AIFunctionDeclaration?

The tool found.

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

[true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) if the tool is registered.

#### Remarks

The result is an `AI.AIFunctionDeclaration`, not an
`AI.AIFunction`: a client-side tool (`AddClientTool`) is
registered as a declaration-only `AIFunctionDeclaration`, which
is not an `AI.AIFunction` and cannot be invoked. Every
registered tool — server-side or client-side — is an
`AI.AIFunctionDeclaration`, so `AIFunctionDeclaration.JsonSchema`
is always available. Callers pass the result straight to
`ChatOptions.Tools`, which accepts the broader `AITool`.
