feat(worker): add external MCP agent-listing tool
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
fec2fe2dda
commit
7196aab31f
+18
@@ -0,0 +1,18 @@
|
|||||||
|
using System.ComponentModel;
|
||||||
|
using ClaudeDo.Data.Models;
|
||||||
|
using ClaudeDo.Worker.Agents;
|
||||||
|
using ModelContextProtocol.Server;
|
||||||
|
|
||||||
|
namespace ClaudeDo.Worker.External;
|
||||||
|
|
||||||
|
[McpServerToolType]
|
||||||
|
public sealed class AgentMcpTools
|
||||||
|
{
|
||||||
|
private readonly AgentFileService _agents;
|
||||||
|
|
||||||
|
public AgentMcpTools(AgentFileService agents) => _agents = agents;
|
||||||
|
|
||||||
|
[McpServerTool, Description("List available agent definition files (name, description, path) for use as a task's agent path.")]
|
||||||
|
public async Task<IReadOnlyList<AgentInfo>> ListAgents(CancellationToken cancellationToken)
|
||||||
|
=> await _agents.ScanAsync(cancellationToken);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user