aspire mcp call command
Ce contenu n’est pas encore disponible dans votre langue.
aspire mcp call - Call an MCP tool on a running resource.
Synopsis
Section titled “Synopsis”aspire mcp call <resource> <tool> [options]Description
Section titled “Description”The aspire mcp call command calls an MCP tool exposed by a resource in a running AppHost. Use aspire mcp tools first if you need to discover the available resources and tool names.
When executed without the --apphost option, the command:
- Scans for all running AppHost processes.
- If multiple AppHosts are running within the current directory scope, prompts you to select which one to target.
- If only one AppHost is running in scope, connects to it directly.
- If no in-scope AppHosts are found but out-of-scope AppHosts exist, displays all running AppHosts for selection.
Arguments
Section titled “Arguments”-
<resource>The name of the resource that exposes the MCP tool.
-
<tool>The name of the MCP tool to call.
Options
Section titled “Options”The following options are available:
-
-i, --input <input>JSON input to pass to the tool.
-
--apphost <apphost>The path to the Aspire AppHost project file.
-
-?, -h, --helpPrints help and usage documentation for the available commands and options.
-
-l, --log-level <Critical|Debug|Error|Information|None|Trace|Warning>Set the minimum log level for console output. Use this option to increase diagnostics while troubleshooting or reduce output in scripted runs.
-
--non-interactiveRun the command in non-interactive mode, disabling all interactive prompts and spinners.
-
--nologoSuppress the startup banner and telemetry notice.
-
--bannerDisplay the animated Aspire CLI welcome banner.
-
--wait-for-debuggerWait for a debugger to attach before running a command.
Examples
Section titled “Examples”-
Call a tool on a running resource:
Aspire CLI aspire mcp call myresource mytool -
Pass JSON input to the tool call:
Aspire CLI aspire mcp call myresource mytool --input '{"message":"hello"}' -
Target a specific AppHost project:
Aspire CLI aspire mcp call myresource mytool --apphost './src/MyApp.AppHost/MyApp.AppHost.csproj'