Commit 874bb00
committed
mcp: replace type struct{} with any for user-defined fields
This change adopts a clearer convention:
- any is used for fields where the structure is defined by
the client or server implementer.
- struct{} is reserved for placeholder fields to be defined
by the MCP spec in the future.
The "Experimental" fields in "ClientCapabilities" and
"ServerCapabilities" now use "map[string]any". This allows
clients and servers to negotiate custom capabilities that contain
complex data, rather than being restricted to a simple on/off flag.
The "Metadata" field in "CreateMessageParams" was also changed to
"any" to properly serve its purpose as a flexible container for
server-defined data.1 parent 3db848a commit 874bb00
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| |||
997 | 997 | | |
998 | 998 | | |
999 | 999 | | |
1000 | | - | |
| 1000 | + | |
1001 | 1001 | | |
1002 | 1002 | | |
1003 | 1003 | | |
| |||
0 commit comments