Skip to content

Commit bfa26a0

Browse files
committed
Fix mcp response payload
1 parent 60ed75d commit bfa26a0

File tree

1 file changed

+13
-9
lines changed
  • all-in-one-apim/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/mcp

1 file changed

+13
-9
lines changed

all-in-one-apim/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/mcp/MCPServerTestCase.java

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -406,15 +406,19 @@ public class MCPServerTestCase extends APIMIntegrationBaseTest {
406406
" }\n" +
407407
"}";
408408

409-
private static final String EXPECTED_TOOL_CALL_GET_PETS_RESPONSE = "[ {\n" +
410-
" \"id\" : \"1\",\n" +
411-
" \"name\" : \"Fido\",\n" +
412-
" \"tag\" : \"dog\"\n" +
413-
"}, {\n" +
414-
" \"id\" : \"2\",\n" +
415-
" \"name\" : \"Whiskers\",\n" +
416-
" \"tag\" : \"cat\"\n" +
417-
"} ]";
409+
private static final String EXPECTED_TOOL_CALL_GET_PETS_RESPONSE = "{\n" +
410+
" \"jsonrpc\": \"2.0\",\n" +
411+
" \"id\": 0,\n" +
412+
" \"result\": {\n" +
413+
" \"isError\": false,\n" +
414+
" \"content\": [\n" +
415+
" {\n" +
416+
" \"text\": \"[\\n { \\\"id\\\": \\\"1\\\", \\\"name\\\": \\\"Fido\\\", \\\"tag\\\": \\\"dog\\\" },\\n { \\\"id\\\": \\\"2\\\", \\\"name\\\": \\\"Whiskers\\\", \\\"tag\\\": \\\"cat\\\" }\\n ]\",\n" +
417+
" \"type\": \"text\"\n" +
418+
" }\n" +
419+
" ]\n" +
420+
" }\n" +
421+
"}";
418422

419423
private static final String EXPECTED_TOOL_CALL_ECHO_RESPONSE = "\"echo\"";
420424

0 commit comments

Comments
 (0)