Files
pfm/PostFundManagement.Application/Abstractions/Mcp/IInAppMcpClient.cs
T
2026-10-30 10:16:27 +02:00

30 lines
1.0 KiB
C#

using ModelContextProtocol.Client;
using PostFundManagement.Application.Mcp;
namespace PostFundManagement.Application.Abstractions.Mcp;
/// <summary>
/// In-app MCP access interface providing in-process tool discovery and execution without network or HTTP hops.
/// </summary>
public interface IInAppMcpClient
{
/// <summary>
/// Lists all available MCP tools defined across Application.Services groupings.
/// </summary>
IReadOnlyList<McpToolDefinition> GetAvailableTools();
/// <summary>
/// Directly executes an in-app MCP tool by name using the current service scope.
/// </summary>
Task<McpToolExecutionResult> ExecuteToolAsync(
string toolName,
IReadOnlyDictionary<string, object?>? arguments = null,
CancellationToken cancellationToken = default);
/// <summary>
/// Creates a fully functional standard ModelContextProtocol McpClient connected in-process over in-memory streams.
/// </summary>
Task<McpClient> CreateProtocolClientAsync(CancellationToken cancellationToken = default);
}