Skip to content

Commit 3984d92

Browse files
authored
Merge pull request #32915 from Azquelt/feature-mcp-server-snapshot
Merge changes from MCP feature branch
2 parents 85f2308 + 5ebceea commit 3984d92

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dev/io.openliberty.mcp.internal/src/io/openliberty/mcp/internal/McpTransport.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ public <T> T getParams(Class<T> type) {
161161
*/
162162
public void sendResponse(Object result) {
163163
McpResponse mcpResponse = new McpResultResponse(mcpRequest.id(), result);
164+
res.setContentType("application/json");
164165
jsonb.toJson(mcpResponse, writer);
165166
}
166167

@@ -193,6 +194,7 @@ public void sendError(Exception e) throws IOException {
193194
*/
194195
public void sendJsonRpcException(JSONRPCException e) {
195196
McpResponse mcpResponse = new McpErrorResponse(mcpRequest == null ? new McpRequestId("") : mcpRequest.id(), e);
197+
res.setContentType("application/json");
196198
jsonb.toJson(mcpResponse, writer);
197199
}
198200

0 commit comments

Comments
 (0)