feat(attachments): MCP tools to attach/list/remove task files
AttachmentMcpTools exposes add_task_attachment (text or base64), list_task_attachments, and remove_task_attachment on the external MCP endpoint, so an agent can prepare reference files (plans, scripts) on a task that will run later. Re-attaching the same name overwrites; add/remove refuse on a running task.
This commit is contained in:
@@ -256,6 +256,9 @@ if (cfg.ExternalMcpPort > 0)
|
||||
externalBuilder.Services.AddScoped<AgentMcpTools>();
|
||||
externalBuilder.Services.AddScoped<LifecycleMcpTools>();
|
||||
externalBuilder.Services.AddScoped<AppSettingsMcpTools>();
|
||||
externalBuilder.Services.AddSingleton(app.Services.GetRequiredService<AttachmentStore>());
|
||||
externalBuilder.Services.AddScoped<TaskAttachmentRepository>();
|
||||
externalBuilder.Services.AddScoped<AttachmentMcpTools>();
|
||||
externalBuilder.Services.AddMcpServer()
|
||||
.WithHttpTransport()
|
||||
.WithTools<ExternalMcpService>()
|
||||
@@ -264,7 +267,8 @@ if (cfg.ExternalMcpPort > 0)
|
||||
.WithTools<RunHistoryMcpTools>()
|
||||
.WithTools<AgentMcpTools>()
|
||||
.WithTools<LifecycleMcpTools>()
|
||||
.WithTools<AppSettingsMcpTools>();
|
||||
.WithTools<AppSettingsMcpTools>()
|
||||
.WithTools<AttachmentMcpTools>();
|
||||
externalBuilder.WebHost.UseUrls($"http://127.0.0.1:{cfg.ExternalMcpPort}");
|
||||
|
||||
externalApp = externalBuilder.Build();
|
||||
|
||||
Reference in New Issue
Block a user