Skip to main content
Glama
rosquillas

Element MCP Server

by rosquillas

matrix_get_messages

Retrieve message history from a specific Matrix room to view conversation content, with pagination support for accessing older or newer messages.

Instructions

Retrieve messages from a specific Matrix room.

Use matrix_list_rooms first to get available room IDs.

Args:

  • room_id: The room ID to fetch messages from

  • limit: Maximum messages to return (1-100, default 50)

  • from: Pagination token for fetching more messages

  • direction: 'b' for older messages, 'f' for newer

Returns:

  • List of messages with sender, timestamp, and content

  • Pagination tokens for fetching more messages

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
room_idYesThe Matrix room ID (e.g., !abc123:matrix.org)
limitNoMaximum number of messages to return
fromNoPagination token from a previous request (use 'end' value)
directionNoDirection to paginate: 'b' for backwards (older), 'f' for forwards (newer)b

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rosquillas/element-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server