docs(matrix-mcp): document send_file, download_file, and unread guard in server instructions

The MCP server instructions string omitted three behaviours added in
earlier PRs, leaving agents without context on them:

- send_file / download_file tools (#1829, #1830)
- [file:]/[image:]/[audio:]/[video:] attachment markers in read_room (#1830)
- unread guard: send_message, send_dm, send_file, send_reply all
  reject if the room has unread messages; read_room + mark_read
  are required first (#1828)

Closes #1828. Closes #1829. Closes #1830.
This commit is contained in:
iris 2026-07-01 18:58:49 +02:00
commit a35fd1dcf2

View file

@ -567,7 +567,18 @@ impl MatrixBridge {
room with `join_room`. Room references accept ids (!abc:server) \
or aliases (#name:server); user references use @user:server. Every \
tool takes an optional `account` (a name from the agent's matrix \
accounts) omit it to act as the primary account.")]
accounts) omit it to act as the primary account. \
`send_file` uploads a local file and posts it as a room attachment \
(MIME inferred from extension, 50 MiB cap); `send_file` is rejected \
with a hint if the room has unread messages read_room then mark_read \
first. `download_file` downloads an attachment from a message event \
to a local file and returns its path; pair with `read_room` which \
surfaces attachments as `[file: name]`, `[image: name]`, \
`[audio: name]`, `[video: name]` markers. \
IMPORTANT: `send_message`, `send_dm`, `send_file`, `send_reply` are \
all rejected if the room has unread messages always call `read_room` \
then `mark_read` on the latest event before sending to a room you \
haven't read yet.")]
impl ServerHandler for MatrixBridge {}
#[tokio::main]