Skip to content

Commit 40eb10c

Browse files
committed
Updates to README.md
1 parent c6f3f91 commit 40eb10c

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

README.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ URL = "http://localhost:9991"
118118

119119
async def main():
120120
# `connect()` is a helper that creates a streamable HTTP client
121-
# and session using the MCP SDK. You can also write a client the
122-
# direclty uses the MCP SDK you prefer!
121+
# and session using the MCP SDK. You can also write a client that
122+
# directly uses the MCP SDK, or use any other MCP client library!
123123
async with connect(URL + "/mcp") as (
124124
session, session_id, protocol_version
125125
):
@@ -133,10 +133,10 @@ if __name__ == '__main__':
133133

134134
### Performing a side-effect "at least once"
135135

136-
Within your tools (and eventually within your prompts and resources
137-
too), you can try and perform a side-effect that it is safe to try one
138-
or more times until success using `at_least_once`. Usually what makes
139-
it safe to perform one or more times is that you can somehow do it
136+
Within your tools (and soon within your prompts and resources too),
137+
you can perform a side-effect that is safe to try one or more times
138+
until success using `at_least_once`. Usually what makes it safe to
139+
perform one or more times is that you can somehow do it
140140
_idempotently_, e.g., passing an idempotency key as part of an API
141141
call. Use `at_least_once` for this, for example:
142142

@@ -172,11 +172,11 @@ async def add(a: int, b: int, context: DurableContext) -> int:
172172

173173
### Performing a side-effect "at most once"
174174

175-
Within your tools (and eventually within your prompts and resources
176-
too), you can try and perform a side-effect that can _only_ be tried
177-
once using `at_most_once`. If you can attempt to perform the
178-
side-effect more than once always prefer `at_least_once`. Here's an
179-
example of `at_most_once`:
175+
Within your tools (and soon within your prompts and resources too),
176+
you can perform a side-effect that can _only_ be tried once using
177+
`at_most_once` (if you can perform the side-effect more than once
178+
using safely then always prefer `at_least_once`). Here's an example of
179+
`at_most_once`:
180180

181181
```python
182182
from reboot.aio.workflows import at_least_once
@@ -220,9 +220,11 @@ Start by enabling debug logging:
220220
mcp = DurableMCP(path="/mcp", log_level="DEBUG")
221221
```
222222

223-
Then consider wrapping your tool/prompt/etc functions in a
224-
`try`/`except` because the MCP SDK will "swallow" errors and all that
225-
the client gets back is just that the request failed.
223+
The MCP SDK is aggressive about "swallowing" errors on the server side
224+
and just returning "request failed" so we do our best to log stack
225+
traces on the server. If you find a place where you've needed to add
226+
your own `try`/`catch` please let us know we'd love to log that for
227+
you automatically.
226228

227229
### Supported client --> server _requests_:
228230
- [x] `initialize`
@@ -260,11 +262,10 @@ the client gets back is just that the request failed.
260262
- [ ] `notifications/cancelled`
261263

262264
### TODO:
265+
- [ ] Auth pass through to MCP SDK
263266
- [ ] Adding tools, resources, and prompts dynamically
264267
- [ ] Add examples of how to test via `Reboot().start/up/down/stop()`
265268
- [ ] Add example of rebooting server using MCP Inspector version [0.16.7](https://github.com/modelcontextprotocol/inspector/releases/tag/0.16.7) which includes [modelcontextprotocol/inspector#787](https://github.com/modelcontextprotocol/inspector/pull/787)
266-
- [ ] Auth
267-
- [ ] Docs at `docs.reboot.dev`
268269
- [ ] `yapf`
269270
- [ ] Pydantic `state` for each session
270271

0 commit comments

Comments
 (0)