These tools handle the message flow — reading inbound messages, pulling the advanced-mode queue, sending replies through the anti-ban governor, and marking work done. The most critical tool here isDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/chamilonster/Piumy/llms.txt
Use this file to discover all available pages before exploring further.
send_message, which has several mandatory gates that must be satisfied before a message is queued.
get_messages
Returns recent messages from a chat.Chat JID.
Maximum number of messages to return.
Retrieving messages via this tool is what marks inbound messages as read on WhatsApp. This is intentional — reads reflect real attention, not just the gateway having received them. The read receipt is sent with an anti-ban delay and is never instant. Do not call this tool in a tight loop expecting instant delivery confirmation.
get_queue
Returns incoming messages in advanced mode that are waiting for an agent to handle them.Maximum number of queued messages to return.
queue count in get_status.
get_decision_policy
Returns the agent’s decision policy — the set of rules that governs whether and how to reply to any chat. You must call this before everysend_message call.
No parameters.
Returns:
| Field | Description |
|---|---|
policy | The full policy text (plain text, owner-editable without restart) |
policy_version | A SHA-256 hash of the current policy content |
policy_version value must be passed verbatim to send_message. If the owner has edited the policy since you last called get_decision_policy, the version hash will have changed and send_message will reject your call with "stale/missing policy_version — call get_decision_policy first".
send_message
Queues a message to send over WhatsApp. The anti-ban governor dispatches it with human-paced timing — it is not sent instantly.Destination JID (e.g.
56999999999@s.whatsapp.net). Must be a full JID with @, not a bare phone number. Copy it from list_chats, get_queue, or resolve_chat — do not construct it by hand.The text content to send.
The agent’s identity string. Every reply is attributed to this value, and it is checked against any active
claim_chat lock on the destination chat.The exact
policy_version hash returned by get_decision_policy. Must match the current policy — call get_decision_policy first, every time."queued for sending" on success.
send_message gates
Every call passes through a chain of checks, in order. All rejections return a clear error string — never a silent drop.Example tool call
set_mode
Changes a chat’s mode.Chat JID.
auto — the auto-reply API handles this chat, or advanced — an agent handles it over MCP."mode updated to <mode>" on success. Also refreshes the queue count.
escalate
Escalates a chat toadvanced mode so a more capable agent or a human operator can take it. Use this whenever you’re uncertain — when in doubt, escalate rather than guessing.
Chat JID.
"escalated to advanced" on success.
mark_handled
Marks a queued advanced-mode message as handled. Call this after you have sent a reply (or decided not to reply) to a specific queue entry.Chat JID.
Message ID from the queue entry (returned by
get_queue)."ok" on success. Also triggers the done mood on the e-paper face and refreshes the queue count.
get_outbox
Returns messages that have been queued viasend_message but have not yet been dispatched by the gateway.
Maximum number of outbox entries to return.
send_message always returns "queued for sending" — it cannot tell you whether the gateway has actually delivered the message. Use get_outbox to check if a reply is still waiting to be sent (e.g. if the gateway is disconnected or the JID was malformed).get_media
Returns images, videos, and stickers that have been downloaded from a chat, with their file paths on disk, MIME type, and file size.Chat JID.
Maximum number of media entries to return.
get_drafts
Returns pending auto-reply drafts that are awaiting the owner’s approval before being sent.Maximum number of draft entries to return.
get_drafts is read-only over MCP. Approving or discarding a draft requires the privileged dashboard or REST API (/api/drafts/approve and /api/drafts/discard). An agent can see what the auto-reply worker has drafted, but cannot approve it.