Skip to content

docs: document the ping utility with examples - #1106

Open
alexhancock wants to merge 1 commit into
mainfrom
alexhancock/document-ping-utility
Open

docs: document the ping utility with examples#1106
alexhancock wants to merge 1 commit into
mainfrom
alexhancock/document-ping-utility

Conversation

@alexhancock

Copy link
Copy Markdown
Contributor

What

Adds a Ping section to the README, covering both directions of the ping utility:

  • Sending a ping — constructing a PingRequest and sending it via send_request (client→server and server→client), with a note that a returned Ok confirms the peer is reachable.
  • Responding to a ping — explains that rmcp answers incoming pings automatically via the default ping handler, with an example of overriding it for custom liveness logic.
  • Links to the MCP ping spec.

Why

Ping was the only non-experimental feature lacking user-facing documentation and an example. Every other feature in the SDK's supported surface is already documented with examples; this closes the remaining gap.

Notes

Documentation-only change (README). The code examples use the existing public API (PingRequest, ClientRequest/ServerRequest, send_request, and the ServerHandler/ClientHandler ping method).

Add a Ping section to the README covering both directions of the
utility: constructing and sending a PingRequest via send_request, and
the automatic default handler response (with an override example for
custom liveness logic). Links to the MCP ping spec.

Ping was the only non-experimental feature lacking user-facing
documentation and an example.
@alexhancock
alexhancock requested a review from a team as a code owner July 31, 2026 00:52
@github-actions github-actions Bot added the T-documentation Documentation improvements label Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-documentation Documentation improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant