# FileSearchToolResource

- Kind: `class`
- Package: [Aspire.Hosting.Foundry](/reference/api/csharp/aspire.hosting.foundry.md)
- Version: `13.4.0-preview.1.26281.18`
- Namespace: `Aspire.Hosting.Foundry`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Foundry/ToolResources/BuiltInToolDefinitions.cs)
- Inherits: [FoundryToolResource](/reference/api/csharp/aspire.hosting.foundry/foundrytoolresource.md)

A Foundry tool resource that enables an agent to search uploaded files and proprietary documents using vector search.

## Definition

```csharp
namespace Aspire.Hosting.Foundry;

public sealed class FileSearchToolResource
    : Aspire.Hosting.Foundry.FoundryToolResource
{
    // ...
}
```

## ATS metadata

### ATS export

- Type ID: `Aspire.Hosting.Foundry/FileSearchToolResource`

## Remarks

This tool requires no Azure provisioning or project connections. Vector store IDs can optionally be configured for specific document collections.

## Constructors

- [FileSearchToolResource(string, AzureCognitiveServicesProjectResource)](/reference/api/csharp/aspire.hosting.foundry/filesearchtoolresource/constructors.md#constructor-string-azurecognitiveservicesprojectresource) -- Creates a new instance of the [FileSearchToolResource](/reference/api/csharp/aspire.hosting.foundry/filesearchtoolresource.md) class.

## Properties

- [VectorStoreIds](/reference/api/csharp/aspire.hosting.foundry/filesearchtoolresource/properties.md#vectorstoreids) : `IList<string>` `get; init` -- Gets the vector store IDs to search. If empty, the agent's default stores are used.

## Methods

- [ToAgentToolAsync(CancellationToken)](/reference/api/csharp/aspire.hosting.foundry/filesearchtoolresource/methods.md#toagenttoolasync-cancellationtoken) : `Task<ResponseTool>` -- Converts this tool definition into the SDK `Responses.ResponseTool` representation.
