Navigation
API > API/Plugins > API/Plugins/ModelContextProtocol > API/Plugins/ModelContextProtocol/IModelContextProtocolTool
Description
Executes this tool asynchronously, performing the described operations over time, using Params as input. Once operations are complete, OnComplete is called with any results. Note: Calls synchronous Run by default, immediately executing OnComplete with the synchronous result.
| Name | RunAsync |
| Type | function |
| Header File | /Engine/Plugins/Experimental/ModelContextProtocol/Source/ModelContextProtocol/Public/IModelContextProtocolTool.h |
| Include Path | #include "IModelContextProtocolTool.h" |
virtual void RunAsync
(
const FModelContextProtocolToolRequestId & RequestId,
const TSharedPtr < FJsonObject > & Params,
const FResultCallback & OnComplete
)
Parameters
| Name | Remarks |
|---|---|
| RequestId | The request id from the client request for identifying this particular tool call. |
| Params | Input parameters. If GetInputJsonSchema returns a valid schema object, these parameters should adhere to said schema. Note: Schema adherence by MCP clients is assumed, not strictly checked internally. |
| OnComplete | Once the operation is complete, implementations must call OnComplete, passing in their JSON formatted tool results. Implementations returning a valid schema from GetOutputJsonSchema MUST ensure results adhere to this schema. |