Local WhatsApp gateway with HTTP and MCP interfaces for apps, automations, and AI tools
ChatRail demonstrates solid tool definition practices with consistent naming (verb_noun pattern), comprehensive parameter schemas using Zod, and tool annotations. All 14 tools have descriptions and input schemas. However, descriptions are terse (avg ~80 chars, below the 194-char baseline), parameter descriptions lack actionable constraint details, and output schemas are not formally documented. Error handling returns structured AppError objects but lacks recovery guidance. The server follows good composition patterns (single responsibility per tool) and includes idempotency hints, but parameter documentation could be more explicit about formats and dependencies.
Return lightweight API/provider health information.
Return reply watch epoch, bound JIDs and reply counts for one recipient.
Return daemon version, provider connection state, safeguards and message counters.
Return local summaries of conversations observed by the daemon.
Read provider, identity, send, receive and acknowledgement events.
Read persisted technical message history. Use list_replies for actionable replies.
List the local recipient allowlist.
Output schemas not formally documented. Tools return JSON via toolSuccess() wrapper, but response structure (fields, types, pagination) is not declared in tool definitions. LLMs cannot plan downstream calls without knowing what fields to expect.
Parameter descriptions lack actionable constraint details. E.g., 'Phone number. Brazilian local formats are normalized by the ChatRail API.' does not explain what formats are accepted or what 'normalized' means. Descriptions should state: 'Phone number (8-30 chars; Brazilian formats like (11) 99999-9999 are auto-normalized to E.164).'
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | B | 71 | <=2025-11-25 | v2 |
Return reply-eligible inbound messages observed after the first outbound send. Defaults to unread only.
Read persisted dry-run, sent, submitted-unconfirmed and failed send records.
Read authoritative WhatsApp unread counters plus a best-effort snapshot of recent inbound messages for those chats, without marking anything as read.
Read actionable inbound/outbound messages whose WhatsApp identity could not be mapped safely to a phone.
Mark eligible inbound replies for one recipient as read locally and, when supported, send seen to WhatsApp.
Create or update a recipient in the outbound allowlist. UTF-8 safety rules remain enforced by the API.
Send one text message through the ChatRail daemon. Recipient allowlist, WhatsApp registration checks, dedupe and idempotency are enforced.
Error handling returns structured errors but lacks recovery guidance. toolFailure() returns code + message, but does not suggest next steps. E.g., 'Recipient not found' should suggest 'Call register_recipient() first' or 'Call list_recipients() to see available recipients.'
Tool descriptions are terse (avg ~80 chars vs 194-char baseline). E.g., 'Return daemon version, provider connection state, safeguards and message counters.' lacks context on WHEN to call get_status vs get_health, or what 'safeguards' means to an LLM.
Pagination not explicitly documented. list_* tools accept 'limit' but do not declare whether they return a total_count, next_cursor, or has_more flag. LLMs cannot determine if results are truncated or plan multi-page fetches.