# AzureCognitiveServicesProjectResource.AddFileSearchTool

- 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 File Search tool to a Microsoft Foundry project, enabling agents to search uploaded files and proprietary documents using vector search.

## Definition

```go
type AzureCognitiveServicesProjectResource interface {
    // ... omitted for brevity
    AddFileSearchTool(
        name string,
        vectorStoreIds []string,
    ) FileSearchToolResource
}
```

## Signature

```go
AddFileSearchTool(
    name string,
    vectorStoreIds []string,
) FileSearchToolResource
```

## Parameters

- `name` (`string`) -- The name of the tool resource.
- `vectorStoreIds` (`[]string`) -- Optional vector store IDs to search. If empty, the agent's default stores are used.

## Returns

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

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

## Defined on

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