Document ping

This commit is contained in:
Jeremiah Lowin 2025-04-23 14:44:59 -04:00
commit d78425cd3f

View file

@ -226,6 +226,15 @@ MCP allows servers to make requests *back* to the client for certain capabilitie
)
```
### Utility Methods
* **`ping()`**: Sends a ping request to the server to verify connectivity.
```python
async def check_connection():
async with client:
await client.ping()
print("Server is reachable")
```
### Error Handling