P1b: Document read-only MCP tools as TaskBridgeService facade
Implementation verified (originally in aaec3eb):
- nexus_get_board: pure facade → bridge.GetBoardAsync()
- nexus_agent_overview: pure facade → bridge.GetAgentOverviewAsync()
- nexus_get_task: pure facade → bridge.GetTaskAsync() + ToResponse()
- nexus_get_children: pure facade → bridge.GetChildTasksAsync()
- nexus_get_activity: pure facade → bridge.GetTaskActivityAsync() + DTO map
All 5 tools register via [McpServerTool] attribute on McpServerToolType class.
No business logic duplication — every tool delegates directly to ITaskBridgeService.
Build: 0w 0e. MCP tests: 44/44 passed.
This commit is contained in:
@@ -15,6 +15,8 @@ public sealed class NexusMcpTools(
|
|||||||
IConfiguration configuration,
|
IConfiguration configuration,
|
||||||
ILogger<NexusMcpTools> logger)
|
ILogger<NexusMcpTools> logger)
|
||||||
{
|
{
|
||||||
|
// ── P1b: Read-only MCP Tools (TaskBridgeService facade) ──
|
||||||
|
|
||||||
[McpServerTool(Name = "nexus_get_board")]
|
[McpServerTool(Name = "nexus_get_board")]
|
||||||
[Description("Get the full Nexus task board grouped by canonical states.")]
|
[Description("Get the full Nexus task board grouped by canonical states.")]
|
||||||
public async Task<BoardResponse> GetBoard(CancellationToken ct = default)
|
public async Task<BoardResponse> GetBoard(CancellationToken ct = default)
|
||||||
@@ -59,6 +61,8 @@ public sealed class NexusMcpTools(
|
|||||||
return activity.Select(entry => new ActivityEntryDto(entry.Id, entry.Type, entry.Message, entry.CreatedAt)).ToList();
|
return activity.Select(entry => new ActivityEntryDto(entry.Id, entry.Type, entry.Message, entry.CreatedAt)).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ── P1c: Mutating MCP Tools ──
|
||||||
|
|
||||||
[McpServerTool(Name = "nexus_create_task")]
|
[McpServerTool(Name = "nexus_create_task")]
|
||||||
[Description("Create a top-level Nexus task.")]
|
[Description("Create a top-level Nexus task.")]
|
||||||
public async Task<TaskBridgeCommandResponse<DashboardTaskDto>> CreateTask(
|
public async Task<TaskBridgeCommandResponse<DashboardTaskDto>> CreateTask(
|
||||||
|
|||||||
Reference in New Issue
Block a user