Forge
csharp3407750f
1using AgentForge.Abstractions;
2using AgentForge.Mcp.Core;
3
4namespace AgentForge.Plugin.Lens;
5
6internal static class ForgeLensMcpTools
7{
8 internal static void Register(ForgeMcpToolRegistry registry) =>
9 ForgeMcpHttpTools.Add(registry, Descriptor, (client, args, ct) =>
10 client.GetForgeLensAsync(
11 ForgeMcpArgParser.RequireString(args, "repo"),
12 ForgeMcpArgParser.OptionalString(args, "file"),
13 ct));
14
15 private static readonly ForgeMcpToolDescriptor Descriptor = new()
16 {
17 Name = ForgeMcpToolNames.LensQuery,
18 Description = "Forge Lens: issues/MR с anchors; file — фильтр по пути.",
19 InputSchema = ForgeMcpSchemas.Object(new
20 {
21 type = "object",
22 properties = new
23 {
24 repo = new { type = "string" },
25 file = new { type = "string", description = "Repo-relative path (optional)." },
26 },
27 required = new[] { "repo" },
28 }),
29 };
30}
31
View only · write via MCP/CIDE