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

Method GetError

mcp/protocol.go:142–144  ·  view source on GitHub ↗

GetError returns the error set with SetError, or nil if none. This function always returns nil on clients.

()

Source from the content-addressed store, hash-verified

140// GetError returns the error set with SetError, or nil if none.
141// This function always returns nil on clients.
142func (r *CallToolResult) GetError() error {
143 return r.err
144}
145
146func (*CallToolResult) isResult() {}
147

Callers 2

TestToolErrorMiddlewareFunction · 0.80

Calls

no outgoing calls

Tested by 2

TestToolErrorMiddlewareFunction · 0.64