FoundryToolboxResource.WithMcpTool

Method
📦 Aspire.Hosting.Foundry v17.0.0-preview.1.26567.5
type FoundryToolboxResource interface {
// ... omitted for brevity
WithMcpTool(
name string,
endpoint any,
options ...*FoundryToolboxMcpToolOptions,
) FoundryToolboxResource
}

Signature

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().

Defined on

This method is defined on the following type: