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

Function pingingTool

examples/server/everything/main.go:192–197  ·  view source on GitHub ↗
(ctx context.Context, req *mcp.CallToolRequest, _ any)

Source from the content-addressed store, hash-verified

190}
191
192func pingingTool(ctx context.Context, req *mcp.CallToolRequest, _ any) (*mcp.CallToolResult, any, error) {
193 if err := req.Session.Ping(ctx, nil); err != nil {
194 return nil, nil, fmt.Errorf("ping failed")
195 }
196 return nil, nil, nil
197}
198
199func loggingTool(ctx context.Context, req *mcp.CallToolRequest, _ any) (*mcp.CallToolResult, any, error) {
200 if err := req.Session.Log(ctx, &mcp.LoggingMessageParams{

Callers

nothing calls this directly

Calls 1

PingMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…