# ToolRegistry

Registry for tools available to the model.

Class 

`IntelligenceX.Tools`

**Namespace**

`IntelligenceX.Tools`

**Assembly**

`IntelligenceX`

**Source**

[ToolRegistry.cs:14](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolRegistry.cs#L14)

**Modifiers**

sealed

Registry for tools available to the model.

## Inheritance

- object
- ToolRegistry

## Usage

Explore 1 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Accepted by parameters 1

- Method [ToolRunner.RunAsync](/api/intelligencex-openai-toolcalling-toolrunner/#method-runasync-intelligencex-openai-intelligencexclient-intelligencex-openai-chat-chatinput-intelligencex-openai-chat-chatoptions-intelligencex-tools-toolregistry-intelligencex-openai-toolcalling-toolrunneroptions-threading-cancellationtoken) parameter `registry`

Filter members 

Show inherited

## Constructors

`public ToolRegistry()` [#](#constructor-ctor)

[ToolRegistry.cs:14](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolRegistry.cs#L14)

## Methods

`public IReadOnlyList<ToolDefinition> GetDefinitions()` [#](#method-getdefinitions)

[ToolRegistry.cs:126](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolRegistry.cs#L126)

Returns tool definitions for the registry.

Returns

`IReadOnlyList<ToolDefinition>`

Register 2 overloads

`public void Register(ITool tool)` [#](#method-register-intelligencex-tools-itool)

[ToolRegistry.cs:57](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolRegistry.cs#L57)

Registers a tool.

Parameters

**tool IntelligenceX.Tools.ITool required**

Tool instance.

`public void Register(ITool tool, bool replaceExisting)` [#](#method-register-intelligencex-tools-itool-boolean)

[ToolRegistry.cs:66](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolRegistry.cs#L66)

Registers a tool with optional replacement.

Parameters

**tool IntelligenceX.Tools.ITool required**

Tool instance.

**replaceExisting bool required**

Replace an existing tool with the same name.

`public void RegisterAlias(string aliasName, string targetToolName, string? description = null, IReadOnlyList<string>? tags = null, bool replaceExisting = false)` [#](#method-registeralias-string-string-string-collections-generic-ireadonlylist-system-string-boolean)

[ToolRegistry.cs:107](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolRegistry.cs#L107)

Registers an alias for an already-registered tool.

Parameters

**aliasName string required**

Alias name.

**targetToolName string required**

Existing canonical or alias tool name to map to.

**description string? = null optional**

Optional alias-specific description override.

**tags System.Collections.Generic.IReadOnlyList<string>? = null optional**

Optional alias tags merged with canonical tags.

**replaceExisting bool = false optional**

Replace an existing registration that uses aliasName.

`public bool TryGet(string name, out ITool tool)` [#](#method-tryget-string-intelligencex-tools-itool)

[ToolRegistry.cs:86](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolRegistry.cs#L86)

Gets a tool by name.

Parameters

**name string required**

**tool IntelligenceX.Tools.ITool required**

Returns

`bool`

`public bool TryGetDefinition(string name, out ToolDefinition definition)` [#](#method-trygetdefinition-string-intelligencex-tools-tooldefinition)

[ToolRegistry.cs:91](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolRegistry.cs#L91)

Gets a registered tool definition by name.

Parameters

**name string required**

**definition IntelligenceX.Tools.ToolDefinition required**

Returns

`bool`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public IToolWriteGovernanceRuntime? WriteGovernanceRuntime { get; set; }` [#](#property-writegovernanceruntime)

[ToolRegistry.cs:25](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolRegistry.cs#L25)

Runtime authorizer used for write-intent tool calls.

`public IToolWriteAuditSink? WriteAuditSink { get; set; }` [#](#property-writeauditsink)

[ToolRegistry.cs:30](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolRegistry.cs#L30)

Append-only audit sink used to persist write authorization events.

`public bool RequireWriteGovernanceRuntime { get; set; }` [#](#property-requirewritegovernanceruntime)

[ToolRegistry.cs:35](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolRegistry.cs#L35)

When true, write-intent calls are rejected if no [ToolRegistry.WriteGovernanceRuntime](/api/intelligencex-tools-toolregistry/) is configured.

`public bool RequireWriteAuditSinkForWriteOperations { get; set; }` [#](#property-requirewriteauditsinkforwriteoperations)

[ToolRegistry.cs:40](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolRegistry.cs#L40)

When true, write-intent calls are rejected when no [ToolRegistry.WriteAuditSink](/api/intelligencex-tools-toolregistry/) is configured.

`public ToolWriteGovernanceMode WriteGovernanceMode { get; set; }` [#](#property-writegovernancemode)

[ToolRegistry.cs:45](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolRegistry.cs#L45)

Runtime mode for write-governance enforcement.

`public bool RequireExplicitRoutingMetadata { get; set; }` [#](#property-requireexplicitroutingmetadata)

[ToolRegistry.cs:50](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolRegistry.cs#L50)

When true, registration rejects inferred routing metadata and requires explicit routing source.

<!-- PowerForge markdown artifact sha256:3DEF85BFF484ABF694EFBE7695719D3224554AA972B59A82372BD94BE69EC483 -->
