From d78425cd3fcb09d486b039410d0e01b586bde6b3 Mon Sep 17 00:00:00 2001 From: Jeremiah Lowin <153965+jlowin@users.noreply.github.com> Date: Wed, 23 Apr 2025 14:44:59 -0400 Subject: [PATCH] Document ping --- docs/clients/client.mdx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/clients/client.mdx b/docs/clients/client.mdx index 479120ce6..d2dcf875c 100644 --- a/docs/clients/client.mdx +++ b/docs/clients/client.mdx @@ -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