Title: can we call tools and return steaming output? · Issue #472 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: can we call tools and return steaming output? · Issue #472 · modelcontextprotocol/python-sdk
X Title: can we call tools and return steaming output? · Issue #472 · modelcontextprotocol/python-sdk
Description: such as @mcp.tool() async def function(text: str): url =URL headers = { "User-Agent": USER_AGENT } async with httpx.AsyncClient() as client: try: async with client.stream("POST", url, headers=headers, json={"text": text}, timeout=100) as...
Open Graph Description: such as @mcp.tool() async def function(text: str): url =URL headers = { "User-Agent": USER_AGENT } async with httpx.AsyncClient() as client: try: async with client.stream("POST", url, headers=heade...
X Description: such as @mcp.tool() async def function(text: str): url =URL headers = { "User-Agent": USER_AGENT } async with httpx.AsyncClient() as client: try: async with client.stream("POST"...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/issues/472
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"can we call tools and return steaming output?","articleBody":"such as \n@mcp.tool()\nasync def function(text: str):\n\n url =URL\n\n headers = {\n \"User-Agent\": USER_AGENT\n }\n\n async with httpx.AsyncClient() as client:\n try:\n async with client.stream(\"POST\", url, headers=headers, json={\"text\": text}, timeout=100) as response:\n response.raise_for_status()\n async for chunk in response.aiter_bytes():\n yield chunk\n except Exception as e:\n print(\"error\", e)","author":{"url":"https://github.com/guanyang-nb","@type":"Person","name":"guanyang-nb"},"datePublished":"2025-04-10T08:33:52.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/472/python-sdk/issues/472"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a332e324-9908-0412-ea9b-8623caaafcbe |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 947E:3424AE:878DD8:B3F4ED:6A5B41F0 |
| html-safe-nonce | 16357ff3b58088180d6e778d599002177f32be91820737c574a4e3fef3590836 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NDdFOjM0MjRBRTo4NzhERDg6QjNGNEVEOjZBNUI0MUYwIiwidmlzaXRvcl9pZCI6Ijc1Nzc1MzA3NzgyODY1MDY0ODAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c3a4d41a1dacf1397a497ff7f8f1168876522ac92cbbe95df4a4cef5aaa26475 |
| hovercard-subject-tag | issue:2984908636 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/modelcontextprotocol/python-sdk/472/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ca2f15dac9cc2a5b63a9c661d1d0db3b65aa83c4de4af5016d0c49abd00dfe89/modelcontextprotocol/python-sdk/issues/472 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ca2f15dac9cc2a5b63a9c661d1d0db3b65aa83c4de4af5016d0c49abd00dfe89/modelcontextprotocol/python-sdk/issues/472 |
| og:image:alt | such as @mcp.tool() async def function(text: str): url =URL headers = { "User-Agent": USER_AGENT } async with httpx.AsyncClient() as client: try: async with client.stream("POST", url, headers=heade... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | guanyang-nb |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| go-import | github.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 862584018 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/python-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 862584018 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/python-sdk |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width