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

Function MakeID

jsonrpc/jsonrpc.go:28–30  ·  view source on GitHub ↗

MakeID coerces the given Go value to an ID. The value should be the default JSON marshaling of a Request identifier: nil, float64, or string. Returns an error if the value type was not a valid Request ID type.

(v any)

Source from the content-addressed store, hash-verified

26//
27// Returns an error if the value type was not a valid Request ID type.
28func MakeID(v any) (ID, error) {
29 return jsonrpc2.MakeID(v)
30}
31
32// EncodeMessage serializes a JSON-RPC message to its wire format.
33func EncodeMessage(msg Message) ([]byte, error) {

Callers

nothing calls this directly

Calls 1

MakeIDFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…