# ToolArgumentCondition

> 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.toolargumentcondition/
> Summary: ToolArgumentCondition: One comparison against a tool call argument: path · operator · value.

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

One comparison against a tool call argument: *path · operator · value*.

```csharp
public sealed record ToolArgumentCondition : IEquatable<ToolArgumentCondition>
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.toolargumentcondition/">ToolArgumentCondition</a></dd><dt>Implements</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable&lt;ToolArgumentCondition&gt;</a></dd><dt>Inherited Members</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a></dd></dl>

## Remarks

A comparison only, never an expression. There is no `OR` — a rule's
conditions are combined with `AND`; two rules are written instead of one
with an `OR`. There is no array index in [ToolArgumentCondition.Path](/api/tracon.toolargumentcondition/#Tracon_ToolArgumentCondition_Path). This is a
deliberate limit ('s sibling): the language must never grow
into a rule engine.

## Constructors

### <a id="Tracon_ToolArgumentCondition__ctor"></a> ToolArgumentCondition\(\)

```csharp
public ToolArgumentCondition()
```

## Properties

### <a id="Tracon_ToolArgumentCondition_Operator"></a> Operator

Gets the comparison operator.

```csharp
public required ToolArgumentOperator Operator { get; init; }
```

#### Property Value

 [ToolArgumentOperator](/api/tracon.toolargumentoperator/)

### <a id="Tracon_ToolArgumentCondition_Path"></a> Path

Gets the dotted path into the argument object, for example `order.amount`.
No array index is accepted.

```csharp
public required string Path { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_ToolArgumentCondition_Value"></a> Value

Gets the value compared against. For [ToolArgumentOperator.In](/api/tracon.toolargumentoperator/) and
[ToolArgumentOperator.NotIn](/api/tracon.toolargumentoperator/) this is a JSON array of text or numbers;
for every other operator it is a single text, number, or boolean.

```csharp
public required JsonElement Value { get; init; }
```

#### Property Value

 [JsonElement](https://learn.microsoft.com/dotnet/api/system.text.json.jsonelement)

## Methods

### <a id="Tracon_ToolArgumentCondition_Equals_System_Object_"></a> Equals\(object?\)

```csharp
public override bool Equals(object? obj)
```

#### Parameters

`obj` [object](https://learn.microsoft.com/dotnet/api/system.object)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_ToolArgumentCondition_Equals_Tracon_ToolArgumentCondition_"></a> Equals\(ToolArgumentCondition?\)

```csharp
public bool Equals(ToolArgumentCondition? other)
```

#### Parameters

`other` [ToolArgumentCondition](/api/tracon.toolargumentcondition/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_ToolArgumentCondition_GetHashCode"></a> GetHashCode\(\)

```csharp
public override int GetHashCode()
```

#### Returns

 [int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="Tracon_ToolArgumentCondition_ToString"></a> ToString\(\)

```csharp
public override string ToString()
```

#### Returns

 [string](https://learn.microsoft.com/dotnet/api/system.string)

## Operators

### <a id="Tracon_ToolArgumentCondition_op_Equality_Tracon_ToolArgumentCondition_Tracon_ToolArgumentCondition_"></a> operator ==\(ToolArgumentCondition?, ToolArgumentCondition?\)

```csharp
public static bool operator ==(ToolArgumentCondition? left, ToolArgumentCondition? right)
```

#### Parameters

`left` [ToolArgumentCondition](/api/tracon.toolargumentcondition/)?

`right` [ToolArgumentCondition](/api/tracon.toolargumentcondition/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_ToolArgumentCondition_op_Inequality_Tracon_ToolArgumentCondition_Tracon_ToolArgumentCondition_"></a> operator \!=\(ToolArgumentCondition?, ToolArgumentCondition?\)

```csharp
public static bool operator !=(ToolArgumentCondition? left, ToolArgumentCondition? right)
```

#### Parameters

`left` [ToolArgumentCondition](/api/tracon.toolargumentcondition/)?

`right` [ToolArgumentCondition](/api/tracon.toolargumentcondition/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)
