diff --git a/docs/tools/matrix.md b/docs/tools/matrix.md index b3ee31b3..bdf3f7fe 100644 --- a/docs/tools/matrix.md +++ b/docs/tools/matrix.md @@ -8,17 +8,35 @@ a second stdio MCP server. Tools land as `mcp__matrix__`: ### Messaging +**Unread guard**: `send_message`, `send_dm`, `send_file`, and +`send_reply` are all rejected if the room has unread messages — call +`read_room` then `mark_read` on the latest event before sending to a +room you haven't read yet. + - `send_message(room, body)` — send a markdown message; `room` accepts `!id:server` or `#alias:server`, daemon resolves either -- `send_dm(user_id, body)` — send a direct message to a matrix user +- `send_dm(user_id, body)` — open (or reuse) the DM room with + `user_id` and post `body` to it - `send_reply(room, event_id, body)` — threaded reply to a specific event - `send_reaction(room, event_id, key)` — react to a message with an emoji key +- `send_file(room, path, caption?)` — upload a local file and post it + as a room attachment; MIME type is inferred from the file extension, + 50 MiB cap; optional `caption` is sent as a follow-up text message +- `send_redact(room, event_id, reason?)` — redact (delete) a specific + event; works on your own events, redacting others' requires moderator + power level ### Reading -- `read_room(room, limit?)` — recent timeline events +- `read_room(room, limit?)` — recent timeline events; media attachments + appear inline as `[file: name]`, `[image: name]`, `[audio: name]`, + or `[video: name]` markers — pass the event id to `download_file` + to retrieve the attachment +- `download_file(room, event_id, dest_path?)` — download a media + attachment from a message event to a local file and return its path; + pair with `read_room` which surfaces attachments as the markers above - `list_rooms()` — enumerate joined rooms (`{ id, canonical_alias, name, member_count }` per room) - `list_room_members(room)` — members of a room