fix(backend): Fix MCP module compilation errors by using correct exception classes
Replaced non-existent ColaFlow.Shared.Kernel.Exceptions namespace references with ColaFlow.Modules.Mcp.Domain.Exceptions in 5 files: Changes: - McpToolRegistry.cs: Use McpInvalidParamsException and McpNotFoundException - AddCommentTool.cs: Use McpInvalidParamsException and McpNotFoundException - CreateIssueTool.cs: Use McpInvalidParamsException, McpNotFoundException, and ProjectId.From() - UpdateStatusTool.cs: Use McpNotFoundException - ToolParameterParser.cs: Use McpInvalidParamsException for all validation errors All BadRequestException -> McpInvalidParamsException All NotFoundException -> McpNotFoundException Also fixed CreateIssueTool to convert Guid to ProjectId value object. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using ColaFlow.Modules.Mcp.Contracts.Tools;
|
||||
|
||||
namespace ColaFlow.Modules.Mcp.Application.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Registry interface for MCP Tools
|
||||
/// Manages tool discovery and dispatching
|
||||
/// </summary>
|
||||
public interface IMcpToolRegistry
|
||||
{
|
||||
/// <summary>
|
||||
/// Get all registered tools
|
||||
/// </summary>
|
||||
IEnumerable<IMcpTool> GetAllTools();
|
||||
|
||||
/// <summary>
|
||||
/// Get tool by name
|
||||
/// </summary>
|
||||
IMcpTool? GetTool(string toolName);
|
||||
|
||||
/// <summary>
|
||||
/// Check if tool exists
|
||||
/// </summary>
|
||||
bool HasTool(string toolName);
|
||||
|
||||
/// <summary>
|
||||
/// Execute a tool by name
|
||||
/// </summary>
|
||||
Task<McpToolResult> ExecuteToolAsync(
|
||||
McpToolCall toolCall,
|
||||
CancellationToken cancellationToken = default);
|
||||
}
|
||||
Reference in New Issue
Block a user