Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AddFunctionTool

Method
📦 Aspire.Hosting.Foundry v17.0.0-preview.1.26565.2
func (AzureCognitiveServicesProjectResource) AddFunctionTool(
name string,
functionName string,
parametersJson string,
options ...*AddFunctionToolOptions,
) FunctionToolResource

Signature

methodAddFunctionToolbuilder
Adds a function calling tool to a Microsoft Foundry project, enabling agents to call application-defined functions with structured parameters.
AddFunctionTool(
name string,
functionName string,
parametersJson string,
options ...*AddFunctionToolOptions,
) FunctionToolResource
namestringThe name of the tool resource.
functionNamestringThe name of the function.
parametersJsonstringThe JSON schema defining the function parameters as a JSON string.
options...*AddFunctionToolOptionsOptional settings, described under Options.

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

Description*stringA description of what the function does.
StrictModeEnabled*boolWhether to enable strict mode for parameter validation.
FunctionToolResource

The resource builder.

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

Applies to

This method applies to the following types: