# IFoundryTool

- Kind: `interface`
- Package: [Aspire.Hosting.Foundry](/reference/api/csharp/aspire.hosting.foundry.md)
- Version: `13.3.0-preview.1.26254.5`
- Namespace: `Aspire.Hosting.Foundry`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Foundry/IFoundryTool.cs)

Represents a Foundry tool that can be attached to a prompt agent.

## Definition

```csharp
namespace Aspire.Hosting.Foundry;

public interface IFoundryTool
{
    // ...
}
```

## Remarks

This interface provides an extensibility point for custom tool implementations that don't fit the standard [FoundryToolResource](/reference/api/csharp/aspire.hosting.foundry/foundrytoolresource.md) model. For most scenarios, use the project-level `Add*Tool` methods which return [FoundryToolResource](/reference/api/csharp/aspire.hosting.foundry/foundrytoolresource.md) subclasses.

## Methods

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