| 1 | using AgentForge.Abstractions; |
| 2 | using AgentForge.Mcp.Core; |
| 3 | |
| 4 | namespace AgentForge.Plugin.Lens; |
| 5 | |
| 6 | internal 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