From 9394b14e1507717dbf7e0a52469c4f9afc67f1f2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 10 Nov 2025 06:28:17 +0000 Subject: [PATCH 1/5] Initial plan From 48c3b7840c0a5e8f1d07d0ff3dbf4439e99a15bf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 10 Nov 2025 08:33:41 +0000 Subject: [PATCH 2/5] Initial plan From 7145352ee2603268f8637435de20c9560806f82c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 10 Nov 2025 10:19:33 +0000 Subject: [PATCH 3/5] Initial plan From 29b7d4f3a0bab4f02b4c8f54ed856afb59270fbb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 10 Nov 2025 10:30:28 +0000 Subject: [PATCH 4/5] Add missing client script entries to pyproject.toml Co-authored-by: BlackDadd77 <179016248+BlackDadd77@users.noreply.github.com> --- examples/snippets/clients/pagination_client.py | 7 ++++++- examples/snippets/clients/parsing_tool_results.py | 7 ++++++- examples/snippets/clients/streamable_basic.py | 7 ++++++- examples/snippets/pyproject.toml | 3 +++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/examples/snippets/clients/pagination_client.py b/examples/snippets/clients/pagination_client.py index 1805d2d315..bbca0ff291 100644 --- a/examples/snippets/clients/pagination_client.py +++ b/examples/snippets/clients/pagination_client.py @@ -37,5 +37,10 @@ async def list_all_resources() -> None: print(f"Total resources: {len(all_resources)}") -if __name__ == "__main__": +def main(): + """Entry point for the pagination client.""" asyncio.run(list_all_resources()) + + +if __name__ == "__main__": + main() diff --git a/examples/snippets/clients/parsing_tool_results.py b/examples/snippets/clients/parsing_tool_results.py index 5158735461..08ed64f08a 100644 --- a/examples/snippets/clients/parsing_tool_results.py +++ b/examples/snippets/clients/parsing_tool_results.py @@ -56,5 +56,10 @@ async def main(): await parse_tool_results() -if __name__ == "__main__": +def run(): + """Entry point for the parsing tool results client.""" asyncio.run(main()) + + +if __name__ == "__main__": + run() diff --git a/examples/snippets/clients/streamable_basic.py b/examples/snippets/clients/streamable_basic.py index 108439613e..7cd0c7645c 100644 --- a/examples/snippets/clients/streamable_basic.py +++ b/examples/snippets/clients/streamable_basic.py @@ -25,5 +25,10 @@ async def main(): print(f"Available tools: {[tool.name for tool in tools.tools]}") -if __name__ == "__main__": +def run(): + """Entry point for the streamable basic client.""" asyncio.run(main()) + + +if __name__ == "__main__": + run() diff --git a/examples/snippets/pyproject.toml b/examples/snippets/pyproject.toml index 76791a55a7..cd16bbc9fd 100644 --- a/examples/snippets/pyproject.toml +++ b/examples/snippets/pyproject.toml @@ -21,3 +21,6 @@ completion-client = "clients.completion_client:main" direct-execution-server = "servers.direct_execution:main" display-utilities-client = "clients.display_utilities:main" oauth-client = "clients.oauth_client:run" +pagination-client = "clients.pagination_client:main" +parsing-tool-results-client = "clients.parsing_tool_results:run" +streamable-basic-client = "clients.streamable_basic:run" From 1ba30d65d9888d81fa6beef3df51070c25a850c6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 10 Nov 2025 10:32:00 +0000 Subject: [PATCH 5/5] Update README with new client entry points Co-authored-by: BlackDadd77 <179016248+BlackDadd77@users.noreply.github.com> --- README.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5dbc4bd9dd..dba40d06a7 100644 --- a/README.md +++ b/README.md @@ -2005,8 +2005,13 @@ async def list_all_resources() -> None: print(f"Total resources: {len(all_resources)}") -if __name__ == "__main__": +def main(): + """Entry point for the pagination client.""" asyncio.run(list_all_resources()) + + +if __name__ == "__main__": + main() ``` _Full example: [examples/snippets/clients/pagination_client.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/clients/pagination_client.py)_ @@ -2146,8 +2151,13 @@ async def main(): print(f"Available tools: {[tool.name for tool in tools.tools]}") -if __name__ == "__main__": +def run(): + """Entry point for the streamable basic client.""" asyncio.run(main()) + + +if __name__ == "__main__": + run() ``` _Full example: [examples/snippets/clients/streamable_basic.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/clients/streamable_basic.py)_