Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

FoundryToolboxResource

Handle
📦 Aspire.Hosting.Foundry v17.0.0-preview.1.26565.2

Represents a Microsoft Foundry Toolbox endpoint associated with a Foundry project.

type FoundryToolboxResource interface {
ExpressionValue
Resource
ResourceWithConnectionString
}

Methods

methodAsExistingbuilder
Uses an existing Microsoft Foundry Toolbox during local runs and deployment.
AsExisting() FoundryToolboxResource
FoundryToolboxResource

The resource builder.

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

methodPublishAsExistingbuilder
Reconciles a Microsoft Foundry Toolbox during local runs and uses an existing Toolbox during deployment.
PublishAsExisting() FoundryToolboxResource
FoundryToolboxResource

The resource builder.

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

methodRunAsExistingbuilder
Uses an existing Microsoft Foundry Toolbox during local runs and reconciles it during deployment.
RunAsExisting() FoundryToolboxResource
FoundryToolboxResource

The resource builder.

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

methodWithAISearchToolbuilder
Adds an Azure AI Search tool definition to the Toolbox.
WithAISearchTool(
name string,
search AzureSearchResource,
indexName string,
options ...*WithAISearchToolOptions,
) FoundryToolboxResource
namestringThe tool name.
searchAzureSearchResourceThe Azure AI Search resource backing the tool.
indexNamestringThe search index name.
options...*WithAISearchToolOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithAISearchToolOptions argument.

Description*stringAn optional description of the Azure AI Search tool.
FoundryToolboxResource

The resource builder.

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

methodWithDescriptionbuilder
Sets the description persisted with each Toolbox version.
WithDescription(description string) FoundryToolboxResource
descriptionstringThe Toolbox description.
FoundryToolboxResource

The resource builder.

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

methodWithMcpToolbuilder
Adds an MCP tool definition to the Toolbox.
WithMcpTool(
name string,
endpoint any,
options ...*FoundryToolboxMcpToolOptions,
) FoundryToolboxResource
namestringThe tool name.
endpointanyThe MCP endpoint. A string URI, an EndpointReference pointing at a resource endpoint, or a ReferenceExpression for cases where the endpoint URL needs to be composed (for example, appending the MCP server's mount path or chaining through a public ingress like a dev tunnel).
options...*FoundryToolboxMcpToolOptionsOptional settings, described under Options.

Optional parameters are passed as the existing *FoundryToolboxMcpToolOptions struct.

FoundryToolboxResource

The resource builder.

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

methodWithWebSearchToolbuilder
Adds a web search tool definition to the Toolbox.
WithWebSearchTool(options ...*WithWebSearchToolOptions) FoundryToolboxResource
options...*WithWebSearchToolOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithWebSearchToolOptions argument.

Name*stringThe tool name.
Description*stringAn optional description of the web search tool.
FoundryToolboxResource

The resource builder.

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