# AzureFunctionToolResource

- 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/AzureFunctionToolResource.cs)
- Inherits: [FoundryToolResource](/reference/api/csharp/aspire.hosting.foundry/foundrytoolresource.md)

A Foundry tool resource that enables an agent to invoke an Azure Function.

## Definition

```csharp
namespace Aspire.Hosting.Foundry;

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

## ATS metadata

### ATS export

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

## Remarks

Azure Functions tools allow agents to call serverless functions as tools. The function definition includes the function name, parameters schema, and input/output bindings for Azure Storage queues.

## Constructors

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

## Properties

- [Description](/reference/api/csharp/aspire.hosting.foundry/azurefunctiontoolresource/properties.md#description) : `string` `get` -- Gets the description of the function (used by the agent to decide when to call it).
- [FunctionName](/reference/api/csharp/aspire.hosting.foundry/azurefunctiontoolresource/properties.md#functionname) : `string` `get` -- Gets the name of the Azure Function.
- [InputQueueEndpoint](/reference/api/csharp/aspire.hosting.foundry/azurefunctiontoolresource/properties.md#inputqueueendpoint) : `string` `get` -- Gets the Azure Storage Queue endpoint for input binding.
- [InputQueueName](/reference/api/csharp/aspire.hosting.foundry/azurefunctiontoolresource/properties.md#inputqueuename) : `string` `get` -- Gets the queue name for input binding.
- [OutputQueueEndpoint](/reference/api/csharp/aspire.hosting.foundry/azurefunctiontoolresource/properties.md#outputqueueendpoint) : `string` `get` -- Gets the Azure Storage Queue endpoint for output binding.
- [OutputQueueName](/reference/api/csharp/aspire.hosting.foundry/azurefunctiontoolresource/properties.md#outputqueuename) : `string` `get` -- Gets the queue name for output binding.
- [Parameters](/reference/api/csharp/aspire.hosting.foundry/azurefunctiontoolresource/properties.md#parameters) : `BinaryData` `get` -- Gets the JSON schema defining the function parameters.

## Methods

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