# ToolRecoveryContract

Declares tool-owned recovery behavior used for resilience inside the tool/engine boundary.

Class 

`IntelligenceX.Tools`

**Namespace**

`IntelligenceX.Tools`

**Assembly**

`IntelligenceX`

**Source**

[ToolRecoveryContract.cs:23](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolRecoveryContract.cs#L23)

**Modifiers**

sealed

Declares tool-owned recovery behavior used for resilience inside the tool/engine boundary.

## Inheritance

- object
- ToolRecoveryContract

## Usage

Explore 2 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.

### Returned or exposed by 1

- Property [ToolDefinition.Recovery](/api/intelligencex-tools-tooldefinition/#property-recovery)

### Accepted by parameters 1

- Constructor [ToolDefinition.ToolDefinition](/api/intelligencex-tools-tooldefinition/#constructor-ctor-string-string-intelligencex-json-jsonobject-string-string-collections-generic-ireadonlylist-system-string-intelligencex-tools-toolwritegovernancecontract-collections-generic-ireadonlylist-intelligencex-tools-toolaliasdefinition-string-intelligencex-tools-toolauthenticationcontract-intelligencex-tools-toolroutingcontract-intelligencex-tools-toolsetupcontract-intelligencex-tools-toolhandoffcontract-intelligencex-tools-toolrecoverycontract-intelligencex-tools-toolexecutioncontract) parameter `recovery`

Filter members 

Show inherited

## Constructors

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

[ToolRecoveryContract.cs:23](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolRecoveryContract.cs#L23)

## Methods

`public void Validate()` [#](#method-validate)

[ToolRecoveryContract.cs:60](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolRecoveryContract.cs#L60)

Validates the contract and throws when invalid.

## 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 bool IsRecoveryAware { get; set; }` [#](#property-isrecoveryaware)

[ToolRecoveryContract.cs:18](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolRecoveryContract.cs#L18)

True when the tool exposes recovery behavior metadata.

`public string RecoveryContractId { get; set; }` [#](#property-recoverycontractid)

[ToolRecoveryContract.cs:23](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolRecoveryContract.cs#L23)

Stable recovery contract identifier.

`public bool SupportsTransientRetry { get; set; }` [#](#property-supportstransientretry)

[ToolRecoveryContract.cs:28](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolRecoveryContract.cs#L28)

True when the tool supports retry for transient failures.

`public int MaxRetryAttempts { get; set; }` [#](#property-maxretryattempts)

[ToolRecoveryContract.cs:33](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolRecoveryContract.cs#L33)

Maximum retry attempts for transient failures.

`public IReadOnlyList<string> RetryableErrorCodes { get; set; }` [#](#property-retryableerrorcodes)

[ToolRecoveryContract.cs:38](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolRecoveryContract.cs#L38)

Optional normalized retryable error codes.

`public bool SupportsAlternateEngines { get; set; }` [#](#property-supportsalternateengines)

[ToolRecoveryContract.cs:43](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolRecoveryContract.cs#L43)

True when the tool can switch to alternate internal execution engines.

`public IReadOnlyList<string> AlternateEngineIds { get; set; }` [#](#property-alternateengineids)

[ToolRecoveryContract.cs:48](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolRecoveryContract.cs#L48)

Optional alternate engine identifiers used when primary execution fails.

`public IReadOnlyList<string> RecoveryToolNames { get; set; }` [#](#property-recoverytoolnames)

[ToolRecoveryContract.cs:54](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolRecoveryContract.cs#L54)

Optional helper tool names that can restore context before retrying or resuming execution. These helpers should be read-only bootstrap/discovery tools when provided.

## Fields

`public const string DefaultContractId` [#](#field-defaultcontractid)

[ToolRecoveryContract.cs:13](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolRecoveryContract.cs#L13)

Default contract id for IX tool recovery metadata.

Value: `ix.tool-recovery.v1`

<!-- PowerForge markdown artifact sha256:E353F5A9C2F65072BE1041E8453978E09E51FCA56AB7085E556FDD121368225F -->
