Added MCp support
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user