Commit 6cf1dd6
committed
normalize structured_content for directly-returned CallToolResult
a tool returning an annotated CallToolResult had its structured_content
validated but not re-dumped, so computed fields and serialization aliases
still disagreed with the serialization-mode output schema. dump the
validated model the same way as ordinary return values. also drop a
stale pragma: no cover on the computed-field property, which runs during
serialization.1 parent d3054e0 commit 6cf1dd6
2 files changed
Lines changed: 27 additions & 2 deletions
File tree
- src/mcp/server/mcpserver/utilities
- tests/server/mcpserver
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
130 | 135 | | |
131 | 136 | | |
132 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
884 | 884 | | |
885 | 885 | | |
886 | 886 | | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
887 | 907 | | |
888 | 908 | | |
889 | 909 | | |
| |||
1120 | 1140 | | |
1121 | 1141 | | |
1122 | 1142 | | |
1123 | | - | |
| 1143 | + | |
1124 | 1144 | | |
1125 | 1145 | | |
1126 | 1146 | | |
| |||
0 commit comments