event: message data: {"result":{"tools":[{"name":"curogram_unread_count","description":"Get the count of unread Curogram conversations (inbox badge).","inputSchema":{"type":"object","properties":{}}},{"name":"curogram_list_conversations","description":"List Curogram conversations (inbox). Returns id, title, type, unreadCount, and last message preview. Use unread_only to triage.","inputSchema":{"type":"object","properties":{"skip":{"type":"number","description":"Pagination offset (default 0)"},"take":{"type":"number","description":"Page size (default 20, max 50)"},"q":{"type":"string","description":"Optional search query"},"unread_only":{"type":"boolean","description":"Only unread threads"}}}},{"name":"curogram_read_thread","description":"Read messages in a conversation thread, newest-first paginated. Returns the message list for the given conversation id.","inputSchema":{"type":"object","properties":{"conversation_id":{"type":"string","description":"Conversation ObjectId"},"skip":{"type":"number","description":"Pagination offset (default 0)"},"take":{"type":"number","description":"Page size (default 20, max 50)"}},"required":["conversation_id"]}},{"name":"curogram_send_text","description":"Send a text message to a patient in a conversation. OUT-OF-BAND APPROVAL-GATED — a two-step human handshake the caller cannot self-grant. STEP 1: call WITHOUT approval_id. The server verifies TCPA consent + conversation/patient linkage, then returns { status: \"pending_approval\", id, content_hash, expires_at } and does NOT send. A human must then confirm out-of-band and the operator releases the approval. STEP 2: call again with the SAME conversation_id / patient_id / message / send_securely PLUS approval_id from step 1. If the approval has been released and is still valid (matching content, unexpired, unused), the server sends. patient_id is required in both steps (consent check + content binding). You cannot approve your own send.","inputSchema":{"type":"object","properties":{"conversation_id":{"type":"string","description":"Conversation ObjectId to send into"},"patient_id":{"type":"string","description":"Patient ObjectId for the TCPA consent check and approval content-binding. Required."},"message":{"type":"string","description":"Message text to send"},"approval_id":{"type":"string","description":"Approval id from a prior pending_approval response. Omit on the first (pending) call; provide on the live send. The caller cannot mint or guess this — it gates the real send behind an out-of-band human release."},"send_securely":{"type":"boolean","description":"Send as a secure (link-gated) message. Default false."}},"required":["conversation_id","patient_id","message"]}},{"name":"curogram_mark_read","description":"Mark a conversation thread as read (whole thread, or up to a specific message id).","inputSchema":{"type":"object","properties":{"conversation_id":{"type":"string","description":"Conversation ObjectId"},"message_id":{"type":"string","description":"Optional: mark read up to this message id. Omit to mark the whole thread."}},"required":["conversation_id"]}},{"name":"curogram_search_patients","description":"Search patients by name or phone. Returns id, displayName, dob. Use to resolve a patient before addressing or consent-checking a send.","inputSchema":{"type":"object","properties":{"q":{"type":"string","description":"Search term (name or phone)"},"skip":{"type":"number","description":"Pagination offset (default 0)"},"take":{"type":"number","description":"Page size (default 20, max 50)"}},"required":["q"]}},{"name":"curogram_get_patient","description":"Get a single patient's demographic record by id.","inputSchema":{"type":"object","properties":{"patient_id":{"type":"string","description":"Patient ObjectId"}},"required":["patient_id"]}},{"name":"curogram_get_comm_prefs","description":"Get a patient's communication preferences (consent, allowSmsMessages, allowCalls, allowEmailMessages, allowMarketingMessages). Check consent + allowSmsMessages before any outbound text (TCPA).","inputSchema":{"type":"object","properties":{"patient_id":{"type":"string","description":"Patient ObjectId"}},"required":["patient_id"]}}]},"jsonrpc":"2.0","id":2}