Skip to content

Commit d57e6f0

Browse files
committed
chore: Handle new MCP structure fields in tests after MCP Python SDK upgrade
1 parent 483cc8f commit d57e6f0

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

src/python/tests/server_adapter/test_adapter.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ def test_success_list_tools():
8181
"title": "echoArguments",
8282
"type": "object",
8383
},
84+
"outputSchema": {
85+
"properties": {
86+
"result": {"title": "Result", "type": "string"}
87+
},
88+
"required": ["result"],
89+
"title": "echoOutput",
90+
"type": "object",
91+
},
8492
}
8593
]
8694
},
@@ -113,6 +121,7 @@ def test_success_call_tool():
113121
id=1,
114122
result={
115123
"content": [{"type": "text", "text": "Echo: Hello world"}],
124+
"structuredContent": {"result": "Echo: Hello world"},
116125
"isError": False,
117126
},
118127
)

src/python/tests/server_adapter/test_stdio_server_adapter_request_handler.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,14 @@ def test_successful_list_tools_request(self, handler, mock_context):
157157
"title": "echoArguments",
158158
"type": "object",
159159
},
160+
"outputSchema": {
161+
"properties": {
162+
"result": {"title": "Result", "type": "string"}
163+
},
164+
"required": ["result"],
165+
"title": "echoOutput",
166+
"type": "object",
167+
},
160168
}
161169
]
162170
}
@@ -193,6 +201,7 @@ def test_successful_tool_call_request(self, handler, mock_context):
193201
assert result.jsonrpc == "2.0"
194202
assert result.result == {
195203
"content": [{"type": "text", "text": "Echo: Hello world"}],
204+
"structuredContent": {"result": "Echo: Hello world"},
196205
"isError": False,
197206
}
198207
assert result.id == 4
@@ -322,6 +331,7 @@ def test_request_serialization(self, handler, mock_context):
322331
assert result.jsonrpc == "2.0"
323332
assert result.result == {
324333
"content": [{"type": "text", "text": "Echo: Complex message with special chars: àáâãäå"}],
334+
"structuredContent": {"result": "Echo: Complex message with special chars: àáâãäå"},
325335
"isError": False,
326336
}
327337
assert result.id == 8

0 commit comments

Comments
 (0)