# AzureCognitiveServicesProjectResource.AddWebSearchTool

- Module: [Aspire.Hosting.Foundry](/reference/api/go/aspire.hosting.foundry.md)
- Defined on: [AzureCognitiveServicesProjectResource](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource.md)
- Version: `17.0.0-preview.1.26567.5`
- Kind: `method`

Adds a Web Search tool to a Microsoft Foundry project, enabling agents to retrieve real-time information from the public web and return answers with inline citations.

## Definition

```go
type AzureCognitiveServicesProjectResource interface {
    // ... omitted for brevity
    AddWebSearchTool(name string) WebSearchToolResource
}
```

## Signature

```go
AddWebSearchTool(name string) WebSearchToolResource
```

## Parameters

- `name` (`string`) -- The name of the tool resource.

## Returns

[`WebSearchToolResource`](/reference/api/go/aspire.hosting.foundry/websearchtoolresource.md) -- The resource builder.

Returns a handle; failures surface later via `Err()`.

## Defined on

- [AzureCognitiveServicesProjectResource](/reference/api/go/aspire.hosting.foundry/azurecognitiveservicesprojectresource.md) -- `handle`
