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

# McpToolResponse

> Represents the result of an MCP tool execution.

## Definition

**Assembly:** CloudNimble.ClaudeEssentials.dll

**Namespace:** CloudNimble.ClaudeEssentials.Hooks.Tools.Responses

**Inheritance:** System.Object

## Syntax

```csharp theme={"dark"}
CloudNimble.ClaudeEssentials.Hooks.Tools.Responses.McpToolResponse
```

## Summary

Represents the result of an MCP tool execution.

## Remarks

The result is an untagged union, so exactly one of [McpToolResponse.Text](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Responses/McpToolResponse.md#text), [McpToolResponse.ContentBlocks](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Responses/McpToolResponse.md#contentblocks), or
[McpToolResponse.StructuredContent](https://si.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Responses/McpToolResponse.md#structuredcontent) is populated, according to the JSON shape that the tool returned.

## Examples

```csharp theme={"dark"}
var payload = ClaudeHooksSerializer.DeserializeMcpPostToolUse(json);
var text = payload?.ToolResponse?.Text;
```

## Constructors

### &#x20;.ctor

#### Syntax

```csharp theme={"dark"}
public McpToolResponse()
```

### &#x20;.ctor Inherited

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

#### Syntax

```csharp theme={"dark"}
public Object()
```

## Properties

### &#x20;ContentBlocks

Gets or sets the content blocks, when the tool returned an array.

#### Syntax

```csharp theme={"dark"}
public System.Collections.Generic.List<CloudNimble.ClaudeEssentials.Hooks.Tools.Responses.McpContentBlock> ContentBlocks { get; set; }
```

#### Property Value

Type: `System.Collections.Generic.List<CloudNimble.ClaudeEssentials.Hooks.Tools.Responses.McpContentBlock>?`

### &#x20;StructuredContent

Gets or sets the structured result, when the tool returned an object.

#### Syntax

```csharp theme={"dark"}
public System.Collections.Generic.Dictionary<string, System.Text.Json.JsonElement> StructuredContent { get; set; }
```

#### Property Value

Type: `System.Collections.Generic.Dictionary<string, System.Text.Json.JsonElement>`

### &#x20;Text

Gets or sets the text result, when the tool returned a string.

#### Syntax

```csharp theme={"dark"}
public string Text { get; set; }
```

#### Property Value

Type: `string?`

## Methods

### &#x20;Equals Inherited Virtual

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

#### Syntax

```csharp theme={"dark"}
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={"dark"}
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={"dark"}
public virtual int GetHashCode()
```

#### Returns

Type: `int`

### &#x20;GetType Inherited

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

#### Syntax

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

#### Returns

Type: `System.Type`

### &#x20;MemberwiseClone Inherited

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

#### Syntax

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

#### Returns

Type: `object`

### &#x20;ReferenceEquals Inherited

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

#### Syntax

```csharp theme={"dark"}
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={"dark"}
public virtual string ToString()
```

#### Returns

Type: `string?`


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