Skip to main content

Definition

Assembly: CloudNimble.ClaudeEssentials.dll Namespace: CloudNimble.ClaudeEssentials.Hooks.Tools.Responses Inheritance: System.Object

Syntax

CloudNimble.ClaudeEssentials.Hooks.Tools.Responses.WebSearchToolResponse

Summary

Represents the response payload returned by the Claude Code WebSearch tool after performing a web search.

Remarks

The WebSearch tool allows Claude to search the web for up-to-date information beyond its training data cutoff. This response is received in the WebSearchPostToolUsePayload when the tool_name is “WebSearch”. Note: Web search is currently only available in the US region. Example JSON payload:
{
"query": "Claude Code documentation 2025",
"results": [
{
"tool_use_id": "srvtoolu_01ABC123...",
"content": [
{
"title": "Claude Code Documentation",
"url": "https://docs.anthropic.com/claude-code"
},
{
"title": "Getting Started with Claude Code",
"url": "https://anthropic.com/claude-code/getting-started"
}
]
}
],
"durationSeconds": 2.45
}

Constructors

.ctor

Syntax

public WebSearchToolResponse()

.ctor Inherited

Inherited from object

Syntax

public Object()

Properties

DurationSeconds

Gets or sets the total duration of the search operation in seconds.

Syntax

public double DurationSeconds { get; set; }

Property Value

Type: double

Remarks

This includes the time taken to perform the web search and process the results. Web searches typically complete within a few seconds, but may take longer depending on network conditions and search complexity.

Query

Gets or sets the search query that was executed.

Syntax

public string Query { get; set; }

Property Value

Type: string

Remarks

This is the exact query string that was sent to the search engine. It matches the WebSearchToolInput.Query from the input.

Results

Gets or sets the search results returned from the web search.

Syntax

public System.Collections.Generic.List<CloudNimble.ClaudeEssentials.Hooks.Tools.Responses.WebSearchResultContainer> Results { get; set; }

Property Value

Type: System.Collections.Generic.List<CloudNimble.ClaudeEssentials.Hooks.Tools.Responses.WebSearchResultContainer>

Remarks

Results are grouped into containers, each containing multiple search result items. The structure allows for multiple result sets from a single search operation. Use these results to inform responses about current events, recent documentation, or other information that may have changed since Claude’s training data cutoff.

Methods

Equals Inherited Virtual

Inherited from object

Syntax

public virtual bool Equals(object obj)

Parameters

NameTypeDescription
objobject?-

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

public static bool Equals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

public virtual int GetHashCode()

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

public System.Type GetType()

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

protected internal object MemberwiseClone()

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

public static bool ReferenceEquals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

public virtual string ToString()

Returns

Type: string?