Skip to main content
Glama
rosquillas

Element MCP Server

by rosquillas

Search Matrix Messages

matrix_search_messages
Read-onlyIdempotent

Search for specific content within Matrix messages across all rooms or a specific room to find relevant conversations.

Instructions

Search for messages across Matrix rooms.

Search for specific content within messages. Can search all rooms or a specific room.

Args:

  • query: Text to search for in messages

  • room_id: Optional room ID to limit search scope

  • limit: Maximum results (1-50, default 10)

Returns:

  • Matching messages with room, sender, and content

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query to find in messages
room_idNoOptional: limit search to a specific room
limitNoMaximum number of results to return
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate read-only, open-world, idempotent, and non-destructive behavior, so the description does not need to repeat these. It adds valuable context by specifying the search scope ('all rooms or a specific room') and return format ('Matching messages with room, sender, and content'), enhancing understanding beyond annotations without contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose, followed by structured 'Args' and 'Returns' sections. Every sentence is necessary and efficient, with no redundant information, making it easy to scan and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity, rich annotations, and 100% schema coverage, the description is largely complete. It explains the purpose, usage, parameters, and return values. However, without an output schema, it could benefit from more detail on the structure of returned messages, though the annotations provide safety context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with each parameter well-documented in the schema. The description adds minimal value by summarizing parameters in the 'Args' section but does not provide additional semantics, syntax, or format details beyond what the schema already covers, meeting the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Search for messages'), resource ('across Matrix rooms'), and scope ('all rooms or a specific room'), distinguishing it from sibling tools like matrix_get_messages (which likely retrieves messages without search) and matrix_list_rooms (which lists rooms rather than searching within them).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for usage ('Search for specific content within messages') and implies when to use it (for searching rather than direct retrieval), but it does not explicitly name alternatives or state when not to use it, such as distinguishing from matrix_get_messages for non-search scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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