FoundryToolboxResource.withMcpTool

Method
📦 Aspire.Hosting.Foundry v17.0.0-preview.1.26567.5
interface FoundryToolboxResource {
// ... omitted for brevity
withMcpTool(
name: string,
endpoint: string | EndpointReference | ReferenceExpression,
options?: FoundryToolboxMcpToolOptions): FoundryToolboxResource;
}

Signature

methodwithMcpToolbuilder
Adds an MCP tool definition to the Toolbox.
withMcpTool(
name: string,
endpoint: string | EndpointReference | ReferenceExpression,
options?: FoundryToolboxMcpToolOptions): FoundryToolboxResource
namestringThe tool name.
endpointstring | EndpointReference | ReferenceExpressionThe 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).
optionsFoundryToolboxMcpToolOptionsoptionalOptional MCP server metadata and approval policy.
FoundryToolboxResource

Defined on

This method is defined on the following type: