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);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ using PostFundManagement.Application.Services.Communications;
|
||||
using PostFundManagement.Domain;
|
||||
using PostFundManagement.Domain.Attributes;
|
||||
using PostFundManagement.Domain.Models;
|
||||
using Result = FluentResults.Result;
|
||||
|
||||
namespace PostFundManagement.Application.Abstractions.Services;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ using PostFundManagement.Application.Services.Evidence;
|
||||
using PostFundManagement.Domain;
|
||||
using PostFundManagement.Domain.Attributes;
|
||||
using PostFundManagement.Domain.Models;
|
||||
using Result = FluentResults.Result;
|
||||
|
||||
namespace PostFundManagement.Application.Abstractions.Services;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using PostFundManagement.Domain;
|
||||
using PostFundManagement.Domain.Attributes;
|
||||
using PostFundManagement.Domain.Models;
|
||||
using Result = FluentResults.Result;
|
||||
|
||||
namespace PostFundManagement.Application.Abstractions.Services;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ using PostFundManagement.Application.Services.Governance;
|
||||
using PostFundManagement.Domain;
|
||||
using PostFundManagement.Domain.Attributes;
|
||||
using PostFundManagement.Domain.Models;
|
||||
using Result = FluentResults.Result;
|
||||
|
||||
namespace PostFundManagement.Application.Abstractions.Services;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ using PostFundManagement.Application.Services.Grants;
|
||||
using PostFundManagement.Domain;
|
||||
using PostFundManagement.Domain.Attributes;
|
||||
using PostFundManagement.Domain.Models;
|
||||
using Result = FluentResults.Result;
|
||||
|
||||
namespace PostFundManagement.Application.Abstractions.Services;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using PostFundManagement.Domain.Attributes;
|
||||
using Result = FluentResults.Result;
|
||||
|
||||
namespace PostFundManagement.Application.Abstractions.Services;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ using PostFundManagement.Application.Services.Projects;
|
||||
using PostFundManagement.Domain;
|
||||
using PostFundManagement.Domain.Attributes;
|
||||
using PostFundManagement.Domain.Models;
|
||||
using Result = FluentResults.Result;
|
||||
|
||||
namespace PostFundManagement.Application.Abstractions.Services;
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ using PostFundManagement.Domain;
|
||||
using PostFundManagement.Domain.Attributes;
|
||||
using PostFundManagement.Domain.Models;
|
||||
using PostFundManagement.Domain.Models.Security;
|
||||
using Result = FluentResults.Result;
|
||||
using Role = PostFundManagement.Domain.Models.Security.Role;
|
||||
|
||||
namespace PostFundManagement.Application.Abstractions.Services;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using PostFundManagement.Application.Services.Shared;
|
||||
using PostFundManagement.Domain.Errors;
|
||||
using Result = FluentResults.Result;
|
||||
|
||||
namespace PostFundManagement.Application.Abstractions.Services;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user