# AzureAISearchToolResource

- Module: [Aspire.Hosting.Foundry](/reference/api/typescript/aspire.hosting.foundry.md)
- Version: `13.4.0-preview.1.26281.18`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire)

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

## Definition

```typescript
interface AzureAISearchToolResource
  extends IResource,
    IFoundryTool {
  withReference(search: AzureSearchResource): AzureAISearchToolResource;
}
```

## Methods

- [withReference](/reference/api/typescript/aspire.hosting.foundry/azureaisearchtoolresource/withreference.md) -- `method` -- Links an Azure AI Search tool to a backing search resource.
    ```typescript
  withReference(search: AzureSearchResource): AzureAISearchToolResource
  ```
