Commit 7243045
Fix ImageContent data encoding - use raw bytes not double-encoded base64
The MCP SDK handles base64 encoding during JSON marshaling, so the Data
field should contain raw binary data, not pre-encoded base64 strings.
This prevents double-encoding where base64 strings were being encoded again.
- Updated NewToolResultResourceWithFlag to pass raw binary data
- Updated test to verify raw binary data instead of base64 string
- Removed unused encoding/base64 imports
Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>1 parent 9f93e65 commit 7243045
2 files changed
+4
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | 4 | | |
7 | 5 | | |
8 | 6 | | |
| |||
79 | 77 | | |
80 | 78 | | |
81 | 79 | | |
| 80 | + | |
82 | 81 | | |
83 | | - | |
| 82 | + | |
84 | 83 | | |
85 | 84 | | |
86 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
90 | 89 | | |
91 | 90 | | |
92 | 91 | | |
93 | | - | |
94 | | - | |
95 | | - | |
| 92 | + | |
| 93 | + | |
96 | 94 | | |
97 | 95 | | |
98 | 96 | | |
| |||
0 commit comments