You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/ManagedCode.MCPGateway/AGENTS.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,3 +75,7 @@ For this .NET project:
75
75
- Do not hide shared runtime services such as `ILoggerFactory` inside options bags for public factory APIs; when custom gateway instances need host-owned shared dependencies, expose a DI-registered factory service that resolves those dependencies from the container and accepts only gateway-specific configuration at creation time.
76
76
- For public runtime-mutation APIs in this package, use precise lifecycle verbs such as `Reconfigure` or `Reset`; avoid ambiguous or alarming names like `Replace` when the operation only rebuilds in-memory registry configuration.
77
77
- For public factory APIs in this package, prefer explicit overloads over nullable optional delegate parameters; use `Create()` plus `Create(Action<T>)` when both cases are supported.
78
+
- Use official `ModelContextProtocol` SDK protocol models as the source of truth at MCP protocol boundaries; introduce gateway-owned models only for gateway-owned catalog, search, routing, or invocation concerns.
79
+
- When a gateway-owned model carries protocol data such as tool schemas, resource metadata, prompt content, or result metadata, type those members to match the corresponding MCP SDK model members instead of inventing parallel string or loosely typed representations.
80
+
- Preserve official MCP SDK protocol metadata and JSON schemas as typed `JsonObject` or `JsonElement` values across descriptors and proxy layers; do not downgrade them to JSON strings and parse them back when the SDK already provides structured objects.
81
+
- Treat `ManagedCode.MCPGateway` as an adapter layer over the official MCP SDK: prefer carrying SDK protocol objects such as `Tool`, `Prompt`, `Resource`, and `ResourceTemplate` through internal catalog boundaries instead of recreating protocol DTOs field-by-field in gateway-owned models.
0 commit comments