MCPcopy Create free account
hub / github.com/modelcontextprotocol/go-sdk / Ping

Method Ping

mcp/client.go:967–970  ·  view source on GitHub ↗

Ping makes an MCP "ping" request to the server.

(ctx context.Context, params *PingParams)

Source from the content-addressed store, hash-verified

965
966// Ping makes an MCP "ping" request to the server.
967func (cs *ClientSession) Ping(ctx context.Context, params *PingParams) error {
968 _, err := handleSend[*emptyResult](ctx, methodPing, newClientRequest(cs, orZero[Params](params)))
969 return err
970}
971
972// ListPrompts lists prompts that are currently available on the server.
973func (cs *ClientSession) ListPrompts(ctx context.Context, params *ListPromptsParams) (*ListPromptsResult, error) {

Callers

nothing calls this directly

Calls 1

newClientRequestFunction · 0.85

Tested by

no test coverage detected