> ## 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.

# WebFetchToolResponse

> Represents the response payload returned by the Claude Code WebFetch tool after fetching and processing content from a URL.

## Definition

**Assembly:** CloudNimble.ClaudeEssentials.dll

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

**Inheritance:** System.Object

## Syntax

```csharp theme={null}
CloudNimble.ClaudeEssentials.Hooks.Tools.Responses.WebFetchToolResponse
```

## Summary

Represents the response payload returned by the Claude Code WebFetch tool after
fetching and processing content from a URL.

## Remarks

The WebFetch tool retrieves content from a specified URL, converts HTML to markdown,
and processes it using a small, fast model based on the provided prompt. This response
is received in the [WebFetchPostToolUsePayload](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/WebFetchPostToolUsePayload.md)
when the `tool_name` is "WebFetch".

Key features of the WebFetch tool:

* HTTP URLs are automatically upgraded to HTTPS
* Content is converted from HTML to markdown for easier processing
* Large content may be summarized or truncated
* Includes a 15-minute cache for repeated requests to the same URL
* Redirects to different hosts are reported rather than followed automatically

Example JSON payload:

```csharp theme={null}
{
  "url": "https://docs.anthropic.com/claude-code",
  "content": "# Claude Code Documentation\n\nClaude Code is a CLI tool...",
  "durationSeconds": 1.25,
  "truncated": false
}
```

## Constructors

### &#x20;.ctor

#### Syntax

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

### &#x20;.ctor Inherited

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

#### Syntax

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

## Properties

### &#x20;Bytes

Gets or sets the number of bytes in the raw response body before processing.

#### Syntax

```csharp theme={null}
public System.Nullable<long> Bytes { get; set; }
```

#### Property Value

Type: `System.Nullable<long>?`

#### Remarks

This indicates the size of the original content fetched from the URL before
any markdown conversion or summarization was applied.

This property may be `null` for older-style responses that do not include
byte-level metrics.

### &#x20;Code

Gets or sets the HTTP status code returned by the server.

#### Syntax

```csharp theme={null}
public System.Nullable<int> Code { get; set; }
```

#### Property Value

Type: `System.Nullable<int>?`

#### Remarks

Common values include `200` (OK), `301` (Moved Permanently),
`404` (Not Found), etc.

This property may be `null` for older-style responses that do not include
the HTTP status code.

### &#x20;CodeText

Gets or sets the HTTP status text corresponding to [WebFetchToolResponse.Code](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Responses/WebFetchToolResponse.md#code).

#### Syntax

```csharp theme={null}
public string CodeText { get; set; }
```

#### Property Value

Type: `string?`

#### Remarks

For example, `"OK"` for a 200 response or `"Moved Permanently"` for a 301 redirect.

This property may be `null` for older-style responses that do not include
the HTTP status text.

### &#x20;Content

Gets or sets the processed content from the fetched URL.

#### Syntax

```csharp theme={null}
public string Content { get; set; }
```

#### Property Value

Type: `string`

#### Remarks

The content is the result of processing the URL with the prompt specified in
[WebFetchToolInput.Prompt](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Inputs/WebFetchToolInput.md#prompt). HTML content is converted to markdown
before processing.

If the content was very large, it may have been summarized by the processing
model. Check [WebFetchToolResponse.Truncated](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Responses/WebFetchToolResponse.md#truncated) to determine if truncation occurred.

### &#x20;DurationMs

Gets or sets the duration of the fetch and processing operation in milliseconds.

#### Syntax

```csharp theme={null}
public System.Nullable<int> DurationMs { get; set; }
```

#### Property Value

Type: `System.Nullable<int>?`

#### Remarks

This includes the time taken to fetch the URL content, convert HTML to markdown,
and process the content with the specified prompt.

This property may be `null` when duration information is not available.

### &#x20;DurationSeconds

Gets or sets the duration of the fetch and processing operation in seconds.

#### Syntax

```csharp theme={null}
public System.Nullable<double> DurationSeconds { get; set; }
```

#### Property Value

Type: `System.Nullable<double>?`

#### Remarks

This includes the time taken to:

Cached responses (within the 15-minute cache window) will typically be faster.

### &#x20;RedirectUrl

Gets or sets the redirect URL if the fetch resulted in a redirect to a different host.

#### Syntax

```csharp theme={null}
public string RedirectUrl { get; set; }
```

#### Property Value

Type: `string?`

#### Examples

```csharp theme={null}
// Original URL: https://short.link/abc
// Redirect URL: https://example.com/full-article
```

#### Remarks

When a URL redirects to a different host (domain), the WebFetch tool does not
automatically follow the redirect. Instead, it reports the redirect URL here
so that a new fetch request can be made explicitly.

This behavior provides transparency about where content is coming from and
prevents unexpected cross-domain requests.

If no cross-host redirect occurred, this property will be `null`.
Same-host redirects (e.g., HTTP to HTTPS on the same domain) are followed automatically.

### &#x20;Result

Gets or sets the processed result text from the fetched URL.

#### Syntax

```csharp theme={null}
public string Result { get; set; }
```

#### Property Value

Type: `string?`

#### Remarks

This is the result of processing the URL content with the prompt. In newer response
schemas, this field is used instead of [WebFetchToolResponse.Content](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Responses/WebFetchToolResponse.md#content).

### &#x20;Truncated

Gets or sets a value indicating whether the content was truncated due to size limits.

#### Syntax

```csharp theme={null}
public System.Nullable<bool> Truncated { get; set; }
```

#### Property Value

Type: `System.Nullable<bool>?`

#### Remarks

When `true`, the original content exceeded the maximum size and was
truncated or summarized. The [WebFetchToolResponse.Content](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Responses/WebFetchToolResponse.md#content) will contain a condensed
version of the information.

For very large pages, consider using a more specific prompt in
[WebFetchToolInput.Prompt](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Inputs/WebFetchToolInput.md#prompt) to extract only the relevant information.

### &#x20;Url

Gets or sets the URL that was fetched.

#### Syntax

```csharp theme={null}
public string Url { get; set; }
```

#### Property Value

Type: `string`

#### Remarks

This is the actual URL that was requested. If the original URL used HTTP,
it will have been upgraded to HTTPS.

If a redirect occurred to a different host, this will still show the original
URL, and [WebFetchToolResponse.RedirectUrl](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Responses/WebFetchToolResponse.md#redirecturl) will contain the redirect destination.

## 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;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.