Keep the sampling conformance scenario live; fix roots example URIs

This commit is contained in:
Jeremiah Lowin 2026-07-27 09:35:30 -04:00
commit 0172e4c4d4
No known key found for this signature in database
3 changed files with 27 additions and 8 deletions

View file

@ -24,7 +24,7 @@ from fastmcp import Client
client = Client(
"my_mcp_server.py",
roots=["/path/to/root1", "/path/to/root2"]
roots=["file:///path/to/root1", "file:///path/to/root2"]
)
```
@ -38,7 +38,7 @@ from fastmcp.client.roots import RequestContext
async def roots_callback(context: RequestContext) -> list[str]:
print(f"Server requested roots (Request ID: {context.request_id})")
return ["/path/to/root1", "/path/to/root2"]
return ["file:///path/to/root1", "file:///path/to/root2"]
client = Client(
"my_mcp_server.py",