Skip to main content
Glama

get_messages

Fetch messages from Zulip chat with filters by stream, topic, sender, or search text. Control pagination with anchor, num_before, and num_after.

Instructions

Fetch messages from Zulip with flexible filtering.

This is the primary tool for reading chat history. Combine filters to narrow down results — e.g., stream + topic to get a specific conversation, or sender + search to find specific messages from a person.

Pagination: Results are anchored at a point and fetch messages before/after it. To paginate through history:

  1. First call: anchor="newest", num_before=100

  2. Next call: anchor=, num_before=100

  3. Repeat until found_oldest is true.

Args: stream: Filter by stream/channel name (e.g., "eng-resharding"). topic: Filter by topic/thread name within a stream. sender: Filter by sender email (e.g., "shreyan@nearone.org"). search: Full-text search query across message content. anchor: Reference point — a message ID (as string) or "newest", "oldest", "first_unread". Defaults to "newest". num_before: Number of messages before the anchor. Max 5000. Defaults to 100. num_after: Number of messages after the anchor. Max 5000. Defaults to 0. include_html: If True, return HTML-rendered content. If False (default), return raw Markdown source — better for analysis.

Returns: JSON object with keys: - messages: list of message objects (id, sender, content, timestamp, etc.) - found_newest: whether there are no newer messages matching the filter - found_oldest: whether there are no older messages matching the filter - anchor: the anchor message ID used

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicNo
anchorNonewest
searchNo
senderNo
streamNo
num_afterNo
num_beforeNo
include_htmlNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

No annotations are provided, so the description carries full burden. It discloses pagination behavior (anchor, num_before/num_after, found_newest/oldest), default values, and the effect of include_html on output format. No contradictions.

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

Conciseness4/5

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

The description is well-structured with an overview, usage tips, pagination instructions, and a parameter list. It is thorough but not overly verbose; could be slightly more concise, but every sentence serves a purpose.

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

Completeness5/5

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

Given the complexity (8 parameters, no required ones, output schema exists), the description covers all aspects: filter parameters, pagination, return keys. It is complete enough for an agent to invoke correctly without ambiguity.

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

Parameters5/5

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

Schema description coverage is 0%, requiring the description to fully explain parameters. It does so thoroughly: allowed anchor values, defaults, max limits for num_before/num_after, and the difference between include_html options. This significantly adds value beyond the schema.

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 starts with 'Fetch messages from Zulip with flexible filtering,' using a specific verb and resource. It distinguishes itself from the sibling tool 'get_message' (singular) by indicating it retrieves multiple messages with filtering capabilities.

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

Usage Guidelines5/5

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

Explicitly states it is the 'primary tool for reading chat history' and provides usage examples (e.g., combining filters). Detailed pagination steps are given, making it clear how to iterate through results. The distinction from 'get_message' is implied.

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/shreyan-gupta/zulip-mcp'

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