Commit 97fc489
committed
mcp: set content to marshaled output
The ToolHandler constructed by ToolFor sets the result's Content to
the marshaled output, following the spec's suggestion.
See https://modelcontextprotocol.io/specification/2025-06-18/server/tools#structured-content.
Also, set StructuredContent to the marshaled RawMessage to avoid a
double marshal.
Fixes #391.1 parent 07b65d7 commit 97fc489
2 files changed
+28
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
261 | 262 | | |
262 | 263 | | |
263 | 264 | | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | 265 | | |
268 | 266 | | |
269 | 267 | | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
| 268 | + | |
| 269 | + | |
274 | 270 | | |
275 | 271 | | |
276 | | - | |
| 272 | + | |
277 | 273 | | |
278 | 274 | | |
279 | | - | |
| 275 | + | |
280 | 276 | | |
281 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
282 | 292 | | |
283 | | - | |
| 293 | + | |
284 | 294 | | |
285 | 295 | | |
286 | 296 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1175 | 1175 | | |
1176 | 1176 | | |
1177 | 1177 | | |
1178 | | - | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
1179 | 1182 | | |
1180 | 1183 | | |
1181 | 1184 | | |
| |||
1186 | 1189 | | |
1187 | 1190 | | |
1188 | 1191 | | |
1189 | | - | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
1190 | 1196 | | |
1191 | 1197 | | |
1192 | 1198 | | |
| |||
0 commit comments