MCPcopy
hub / github.com/modelcontextprotocol/python-sdk / exit

Method exit

tests/client/test_stdio.py:173–176  ·  view source on GitHub ↗

Die: set the exit code and EOF stdout, as the kernel does.

(self, code: int = 0)

Source from the content-addressed store, hash-verified

171 self._stdout_send.close()
172
173 def exit(self, code: int = 0) -> None:
174 """Die: set the exit code and EOF stdout, as the kernel does."""
175 self.returncode = code
176 self.close_stdout()
177
178 def pending_stdout_chunks(self) -> int:
179 """How many fed chunks the client has not yet pulled off the fake stdout."""

Calls 1

close_stdoutMethod · 0.95

Tested by

no test coverage detected