Forge
csharp3407750f
1using System.Text.Json;
2
3namespace AgentForge.Mcp.Core;
4
5public static class ForgeMcpSchemas
6{
7 private static readonly JsonElement AnchorItemSchema = Object(new
8 {
9 type = "object",
10 properties = new
11 {
12 file = new { type = "string", description = "Repo-relative file path." },
13 line_start = new { type = "integer", description = "Start line (1-based)." },
14 line_end = new { type = "integer", description = "End line (optional)." },
15 member_key = new { type = "string", description = "Optional member/symbol key (CIDE)." },
16 },
17 required = new[] { "file", "line_start" },
18 });
19
20 public static JsonElement Anchors { get; } = Object(new
21 {
22 type = "array",
23 items = AnchorItemSchema,
24 description = "CIDE-compatible code anchors (FORGE-ADR-0003).",
25 });
26
27 public static JsonElement EmptyObject { get; } = Object(new { type = "object", properties = new { } });
28
29 public static JsonElement Object(object schema) => JsonSerializer.SerializeToElement(schema);
30}
31
View only · write via MCP/CIDE