Definition
Assembly: CloudNimble.ClaudeEssentials.dll Namespace: CloudNimble.ClaudeEssentials.Hooks.Tools.Responses Inheritance: System.ObjectSyntax
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 when thetool_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
Constructors
.ctor
Syntax
.ctor Inherited
Inherited from
objectSyntax
Properties
Bytes
Gets or sets the number of bytes in the raw response body before processing.Syntax
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 benull for older-style responses that do not include
byte-level metrics.
Code
Gets or sets the HTTP status code returned by the server.Syntax
Property Value
Type:System.Nullable<int>?
Remarks
Common values include200 (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.
CodeText
Gets or sets the HTTP status text corresponding to WebFetchToolResponse.Code.Syntax
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.
Content
Gets or sets the processed content from the fetched URL.Syntax
Property Value
Type:string
Remarks
The content is the result of processing the URL with the prompt specified in WebFetchToolInput.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 to determine if truncation occurred.DurationMs
Gets or sets the duration of the fetch and processing operation in milliseconds.Syntax
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 benull when duration information is not available.
DurationSeconds
Gets or sets the duration of the fetch and processing operation in seconds.Syntax
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.RedirectUrl
Gets or sets the redirect URL if the fetch resulted in a redirect to a different host.Syntax
Property Value
Type:string?
Examples
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 benull.
Same-host redirects (e.g., HTTP to HTTPS on the same domain) are followed automatically.
Result
Gets or sets the processed result text from the fetched URL.Syntax
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.Truncated
Gets or sets a value indicating whether the content was truncated due to size limits.Syntax
Property Value
Type:System.Nullable<bool>?
Remarks
Whentrue, the original content exceeded the maximum size and was
truncated or summarized. The WebFetchToolResponse.Content will contain a condensed
version of the information.
For very large pages, consider using a more specific prompt in
WebFetchToolInput.Prompt to extract only the relevant information.
Url
Gets or sets the URL that was fetched.Syntax
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 will contain the redirect destination.Methods
Equals Inherited Virtual
Inherited from
objectSyntax
Parameters
Returns
Type:bool
Equals Inherited
Inherited from
objectSyntax
Parameters
Returns
Type:bool
GetHashCode Inherited Virtual
Inherited from
objectSyntax
Returns
Type:int
GetType Inherited
Inherited from
objectSyntax
Returns
Type:System.Type
MemberwiseClone Inherited
Inherited from
objectSyntax
Returns
Type:object
ReferenceEquals Inherited
Inherited from
objectSyntax
Parameters
Returns
Type:bool
ToString Inherited Virtual
Inherited from
objectSyntax
Returns
Type:string?