# AzureAISearchToolResource Constructors

- Package: [Aspire.Hosting.Foundry](/reference/api/csharp/aspire.hosting.foundry.md)
- Type: [AzureAISearchToolResource](/reference/api/csharp/aspire.hosting.foundry/azureaisearchtoolresource.md)
- Kind: `Constructors`
- Members: `1`

A Foundry tool resource that grounds an agent's responses using data from an Azure AI Search index.

## AzureAISearchToolResource(string, AzureCognitiveServicesProjectResource)

- Name: `Constructor(string, AzureCognitiveServicesProjectResource)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Foundry/ToolResources/AzureAISearchToolResource.cs#L31-L33)

Creates a new instance of the [AzureAISearchToolResource](/reference/api/csharp/aspire.hosting.foundry/azureaisearchtoolresource.md) class.

```csharp
public class AzureAISearchToolResource
{
    public AzureAISearchToolResource(
        string name,
        AzureCognitiveServicesProjectResource project)
    {
        // ...
    }
}
```

## Parameters

- `name` (`string`)
  The name of the tool resource.
- `project` ([AzureCognitiveServicesProjectResource](/reference/api/csharp/aspire.hosting.foundry/azurecognitiveservicesprojectresource.md))
  The parent Foundry project resource.
