Placeholder for a response the MCP transport wrote itself. Both handlers below hand the raw ASGI ``send`` to the SDK, which emits the complete response. FastAPI still does ``await endpoint(request)`` followed by ``await response(...)``, so returning ``None`` raises ``TypeError: 'Non
| 50 | |
| 51 | |
| 52 | class _AlreadySentResponse(Response): |
| 53 | """Placeholder for a response the MCP transport wrote itself. |
| 54 | |
| 55 | Both handlers below hand the raw ASGI ``send`` to the SDK, which emits the |
| 56 | complete response. FastAPI still does ``await endpoint(request)`` followed |
| 57 | by ``await response(...)``, so returning ``None`` raises ``TypeError: |
| 58 | 'NoneType' object is not callable`` and returning a real ``Response`` starts |
| 59 | a second response on a finished ASGI cycle. This satisfies FastAPI while |
| 60 | putting nothing on the wire. |
| 61 | """ |
| 62 | |
| 63 | async def __call__(self, scope, receive, send) -> None: |
| 64 | return |
| 65 | |
| 66 | |
| 67 | class _SendTracker: |
no outgoing calls
no test coverage detected