# ToolAuthenticationContract

Declares authentication requirements and argument conventions for a tool definition.

Class 

`IntelligenceX.Tools`

**Namespace**

`IntelligenceX.Tools`

**Assembly**

`IntelligenceX`

**Source**

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

**Modifiers**

sealed

Declares authentication requirements and argument conventions for a tool definition.

## Inheritance

- object
- ToolAuthenticationContract

## Usage

Explore 5 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 4

- Method [ToolAuthenticationConventions.HostManaged](/api/intelligencex-tools-toolauthenticationconventions/#method-hostmanaged-boolean-boolean-string)
- Method [ToolAuthenticationConventions.ProfileReference](/api/intelligencex-tools-toolauthenticationconventions/#method-profilereference-string-boolean-boolean-string)
- Method [ToolAuthenticationConventions.RunAsReference](/api/intelligencex-tools-toolauthenticationconventions/#method-runasreference-string-boolean-boolean-string)
- Property [ToolDefinition.Authentication](/api/intelligencex-tools-tooldefinition/#property-authentication)

### 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 `authentication`

Filter members 

Show inherited

## Constructors

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

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

## Methods

`public IReadOnlyList<string> GetSchemaArgumentNames()` [#](#method-getschemaargumentnames)

[ToolAuthenticationContract.cs:109](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolAuthenticationContract.cs#L109)

Returns schema argument names expected by this authentication mode.

Returns

`IReadOnlyList<string>`

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

[ToolAuthenticationContract.cs:64](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolAuthenticationContract.cs#L64)

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

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

True when tool exposes authentication behavior/requirements.

`public bool RequiresAuthentication { get; set; }` [#](#property-requiresauthentication)

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

True when authentication is required for normal operation.

`public string AuthenticationContractId { get; set; }` [#](#property-authenticationcontractid)

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

Stable authentication contract identifier.

`public ToolAuthenticationMode Mode { get; set; }` [#](#property-mode)

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

Strategy used for authentication source selection.

`public string ProfileIdArgumentName { get; set; }` [#](#property-profileidargumentname)

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

Argument name used by [ToolAuthenticationMode.ProfileReference](/api/intelligencex-tools-toolauthenticationmode/).

`public string RunAsProfileIdArgumentName { get; set; }` [#](#property-runasprofileidargumentname)

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

Argument name used by [ToolAuthenticationMode.RunAsReference](/api/intelligencex-tools-toolauthenticationmode/).

`public bool SupportsConnectivityProbe { get; set; }` [#](#property-supportsconnectivityprobe)

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

True when tool should expose a preflight connectivity/auth probe flow.

`public string ProbeToolName { get; set; }` [#](#property-probetoolname)

[ToolAuthenticationContract.cs:53](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolAuthenticationContract.cs#L53)

Optional probe tool name to validate authentication before mutating operations.

`public string ProbeIdArgumentName { get; set; }` [#](#property-probeidargumentname)

[ToolAuthenticationContract.cs:58](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Tools/ToolAuthenticationContract.cs#L58)

Argument name used when [ToolAuthenticationContract.SupportsConnectivityProbe](/api/intelligencex-tools-toolauthenticationcontract/) is enabled.

## Fields

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

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

Default contract id for IX tool authentication metadata.

Value: `ix.tool-auth.v1`

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