> ## Documentation Index
> Fetch the complete documentation index at: https://ai.easyaf.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# ShutdownServerTool

> Local-only control-plane tool that cancels the host lifetime after an optional delay.

## Definition

**Assembly:** Microsoft.OData.Mcp.Tools.dll

**Namespace:** Microsoft.OData.Mcp.Tools.Hosting

**Inheritance:** System.Object

## Syntax

```csharp theme={null}
Microsoft.OData.Mcp.Tools.Hosting.ShutdownServerTool
```

## Summary

Local-only control-plane tool that cancels the host lifetime after an optional delay.

## Constructors

### &#x20;.ctor

Initializes a new instance of the [ShutdownServerTool](https://ai.easyaf.dev/odata-mcp/api-reference/Microsoft/OData/Mcp/Tools/Hosting/ShutdownServerTool.md) class.

#### Syntax

```csharp theme={null}
public ShutdownServerTool(System.Threading.CancellationTokenSource lifetime)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `lifetime` | `System.Threading.CancellationTokenSource` | The host lifetime source to cancel. |

### &#x20;.ctor Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public Object()
```

## Methods

### &#x20;Equals Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public virtual bool Equals(object obj)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `obj` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;Equals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public static bool Equals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;GetHashCode Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public virtual int GetHashCode()
```

#### Returns

Type: `int`

### &#x20;GetType Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public System.Type GetType()
```

#### Returns

Type: `System.Type`

### &#x20;InvokeAsync

Acknowledges shutdown and cancels the host after *delaySeconds*.

#### Syntax

```csharp theme={null}
public System.Threading.Tasks.Task<string> InvokeAsync(string reason, int delaySeconds, System.Threading.CancellationToken cancellationToken)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `reason` | `string?` | The reason recorded in the acknowledgement. |
| `delaySeconds` | `int` | Delay between 0 and 10 seconds. Zero cancels immediately. |
| `cancellationToken` | `System.Threading.CancellationToken` | The cancellation token. |

#### Returns

Type: `System.Threading.Tasks.Task<string>`
JSON acknowledgement text.

### &#x20;MemberwiseClone Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
protected internal object MemberwiseClone()
```

#### Returns

Type: `object`

### &#x20;ReferenceEquals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public static bool ReferenceEquals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;ToString Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public virtual string ToString()
```

#### Returns

Type: `string?`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.