Phase 7.3: room_info(room_id) tool #20

Merged
jlxq0 merged 2 commits from phase-7-3-room-info into main 2026-05-15 03:35:25 +00:00
jlxq0 commented 2026-05-15 03:19:16 +00:00 (Migrated from github.com)

Summary

Adds a single new read-only MCP tool: `room_info(room_id)`.

Returns a structured object with:

  • `room_id`, `display_name`, `name`, `topic`
  • `encrypted` (m.room.encryption present)
  • `joined_members_count`, `active_members_count`
  • `my_power_level: Option` + `is_room_creator: bool` (the room-v12+ `Infinite` creator case is surfaced as a separate bool rather than a sentinel int)
  • `my_membership` (joined | invited | left | knocked | banned)

All from cached room state; only `power_levels()` makes an async call into the SDK, and that falls back to `None` if the room's power-level state event hasn't synced yet. Rate-limited as a Read.

Branch is based on `phase-6-1-rate-limit`; rebase onto main once PR #19 lands.

Test plan

  • CI green
  • After deploy: `room_info` on a kampong.social room returns sensible values
  • `room_info` on a bridged room (E2EE) returns sensible values + `encrypted: true`
  • `room_info` on a room we're not joined to returns a clean `invalid_params`

🤖 Generated with Claude Code

## Summary Adds a single new read-only MCP tool: \`room_info(room_id)\`. Returns a structured object with: - \`room_id\`, \`display_name\`, \`name\`, \`topic\` - \`encrypted\` (m.room.encryption present) - \`joined_members_count\`, \`active_members_count\` - \`my_power_level: Option<i64>\` + \`is_room_creator: bool\` (the room-v12+ \`Infinite\` creator case is surfaced as a separate bool rather than a sentinel int) - \`my_membership\` (joined | invited | left | knocked | banned) All from cached room state; only \`power_levels()\` makes an async call into the SDK, and that falls back to \`None\` if the room's power-level state event hasn't synced yet. Rate-limited as a Read. Branch is based on \`phase-6-1-rate-limit\`; rebase onto main once PR #19 lands. ## Test plan - [ ] CI green - [ ] After deploy: \`room_info\` on a kampong.social room returns sensible values - [ ] \`room_info\` on a bridged room (E2EE) returns sensible values + \`encrypted: true\` - [ ] \`room_info\` on a room we're not joined to returns a clean \`invalid_params\` 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No description provided.