Skip to content

Commit 1d1d60b

Browse files
committed
docs: show the resolver server in the -32021 troubleshooting entry
The entry linked down to a section whose first server.py is the ctx.elicit variant, which produces a different error. Include the resolver-based Bistro directly so the entry has its own server.
1 parent 26cf9c7 commit 1d1d60b

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

docs/troubleshooting.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,13 @@ One thing does **not** produce this error, despite being a request the modern pr
276276

277277
Your server wants to ask the user something, and this client never said it can be asked.
278278

279-
An elicitation resolver refuses up front when the connected client did not declare form elicitation, and `e.error.data` names exactly what is missing:
279+
This Bistro asks before it books, through a resolver:
280+
281+
```python title="server.py" hl_lines="15-17 21"
282+
--8<-- "docs_src/troubleshooting/tutorial007.py"
283+
```
284+
285+
Serve it in place of the Weather server and call `book_table` from a client that passed no `elicitation_callback`. The resolver refuses up front, because the connected client never declared form elicitation, and `e.error.data` names exactly what is missing:
280286

281287
```json
282288
{
@@ -286,7 +292,7 @@ An elicitation resolver refuses up front when the connected client did not decla
286292
}
287293
```
288294

289-
The server here is the Bistro with the `book_table` resolver, the [`server.py` further down](#mcperror-cannot-send-elicitationcreate-this-transport-context-has-no-back-channel-for-server-initiated-requests), served the same way. Pass `elicitation_callback=` to `Client(...)`. Registering the callback *is* the capability declaration; there is no second switch:
295+
Pass `elicitation_callback=` to `Client(...)`. Registering the callback *is* the capability declaration; there is no second switch:
290296

291297
```python
292298
async def main() -> None:

0 commit comments

Comments
 (0)