MCPcopy Create free account
hub / github.com/c4pt0r/pie / write_message

Function write_message

examples/mcp-notify-python/notify-server.py:39–43  ·  view source on GitHub ↗
(payload: dict)

Source from the content-addressed store, hash-verified

37
38
39def write_message(payload: dict) -> None:
40 line = json.dumps(payload, separators=(",", ":"))
41 with _write_lock:
42 sys.stdout.write(line + "\n")
43 sys.stdout.flush()
44
45
46def send_response(request_id, result=None, error=None) -> None:

Callers 2

send_responseFunction · 0.70
send_notificationFunction · 0.70

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected