Skip to content

Commit 34c71ba

Browse files
committed
feat: Add output schema definitions for notification results and update test cases
1 parent 0abc072 commit 34c71ba

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

examples/servers/simple-streamablehttp/mcp_simple_streamablehttp/server.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,14 @@ async def list_tools() -> list[types.Tool]:
117117
},
118118
},
119119
},
120+
outputSchema={
121+
"type": "array",
122+
"items": {
123+
"type": "object",
124+
"description": "TextContent with notification information",
125+
},
126+
"description": "List of text content with notification results",
127+
},
120128
)
121129
]
122130

src/mcp/client/session_group.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ async def __aexit__(
154154
for exit_stack in self._session_exit_stacks.values():
155155
tg.start_soon(exit_stack.aclose)
156156

157-
158157
@property
159158
def sessions(self) -> list[mcp.ClientSession]:
160159
"""Returns the list of sessions being managed."""

tests/server/fastmcp/test_tool_manager.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class AddArguments(ArgModelBase):
4949
fn_metadata=fn_metadata,
5050
is_async=False,
5151
parameters=AddArguments.model_json_schema(),
52+
output_schema={"type": "integer"},
5253
context_kwarg=None,
5354
annotations=None,
5455
)

0 commit comments

Comments
 (0)