MCPcopy Create free account
hub / github.com/bigdra50/unity-cli / parse_message

Function parse_message

relay/protocol.py:326–331  ·  view source on GitHub ↗

Parse a raw message dict (for validation/logging)

(data: dict[str, Any])

Source from the content-addressed store, hash-verified

324
325
326def parse_message(data: dict[str, Any]) -> dict[str, Any]:
327 """Parse a raw message dict (for validation/logging)"""
328 msg_type = data.get("type")
329 if not msg_type:
330 raise ValueError("Missing 'type' field")
331 return data
332
333
334def generate_request_id(client_id: str | None = None) -> str:

Callers 2

test_valid_messageMethod · 0.90
test_missing_typeMethod · 0.90

Calls 1

getMethod · 0.45

Tested by 2

test_valid_messageMethod · 0.72
test_missing_typeMethod · 0.72