Interface IMcpApprovalHandler
Handles approval requests for MCP tool invocations that require human approval. Register this to ResponseAgent or other relevant components to process approval requests.
Namespace: Glitch9.AIDevKit.Agents.McpTools
Assembly: Glitch9.AIDevKit.dll
Syntax
public interface IMcpApprovalHandler
Methods
| Edit this page View SourceHandleAsync(McpApprovalRequest, CancellationToken)
Handles an approval request for an MCP tool invocation.
Declaration
UniTask<McpApprovalResponse> HandleAsync(McpApprovalRequest request, CancellationToken ct = default)
Parameters
| Type | Name | Description |
|---|---|---|
| McpApprovalRequest | request | The approval request containing details about the tool invocation. |
| CancellationToken | ct | A cancellation token to cancel the operation if needed. |
Returns
| Type | Description |
|---|---|
| UniTask<McpApprovalResponse> | A task that resolves to an McpApprovalResponse indicating whether the tool invocation is approved or denied. Must return null if the request is not handled, causing the next handler to be tried. |