---
name: message-send
description: Send messages through OpenClaw's `message` tool on the Grix channel — reply in the current session, or send to another session by its exact `session_id` in `to`. Also defines the `grix://card/conversation` link for pointing the user at a chat. Trigger words: send DM, DM, send message, notify.
---

# Message Send

Send messages with OpenClaw's `message` tool, `action: "send"`,
`channel: "grix"`.

## Parameters

| Parameter | Required | Value |
|---|---|---|
| `action` | ✅ | `"send"` |
| `channel` | ✅ | `"grix"` |
| `accountId` | ✅ | the current Grix account ID (never hardcode `default`) |
| `message` | ✅ | text; plain text and Markdown are supported |
| `to` | cross-session only | exact Grix `session_id` (usually a UUID), or an existing `route.sessionKey` |

- **Current session reply**: omit `to`.
- **Another session**: set `to` to the bare `session_id`, e.g.
  `to=e72ce987-2d2e-40ed-bcc9-b336b4974512`. `grix:<id>` / `session:<id>`
  are parsed for compatibility but are not the default. Never use
  `target=agent:…`, a bare numeric user/agent ID (fails, no auto-conversion),
  or an invented alias.

```json
{ "action": "send", "channel": "grix", "accountId": "{accountId}", "to": "{sessionId}", "message": "Task completed, please check the results." }
```

Finding the target: reuse a `session_id` already known from context or
MEMORY.md; otherwise resolve it with `grix_query` (`session_search`). Confirm
the account may send to that session, and do not spam proactive messages.

Errors: unresolvable `to` → check the `session_id`; permission denied → the
account cannot send to that session; missing parameter → supply it.

## Conversation card — `grix://card/conversation`

When you want the user to **open a group or private chat** and you already
know its exact `session_id`, send a card link instead of prose or a web link;
the client renders it as a clickable conversation card.

```text
[Open Group](grix://card/conversation?session_id=<SESSION_ID>&session_type=group&title=<ENCODED_TITLE>)
[Open Conversation](grix://card/conversation?session_id=<SESSION_ID>&session_type=private&title=<ENCODED_TITLE>&peer_id=<ENCODED_PEER_ID>)
```

- `session_id` (required, exact), `session_type` (required: `group` |
  `private`), `title` (required, shown to the user), `peer_id` (private only,
  optional).
- URI-component-encode `title`, `peer_id`, and any other text value; the link
  text outside the parentheses is plain copy and needs no encoding.
- The card must be **one line, alone in its own message** — one card per
  message; put any explanation in a separate message sent first.
- No `session_id` → plain-text explanation only; never fabricate a card.
- Never emit `chat://…` links, "click here" prose, or frontend-internal
  `biz_card` JSON.

Example:

```text
Message 1: The test group has been created — tap the card below to open it.
Message 2: [Open Test Group](grix://card/conversation?session_id=0fa947bd-bb4e-46ad-8308-5526bc98e002&session_type=group&title=%E6%B5%8B%E8%AF%95%E7%BE%A4)
```
