Skip to main content
Glama

get_message_context

Read-onlyIdempotent

Fetch messages before and after a specific message to read the surrounding discussion, leaving read markers and notifications unchanged.

Instructions

Get the messages around one message, e.g. to read the discussion a search result or mention is in.

Reading context leaves the read marker and notifications as they are.

Args: token: The conversation token. message_id: The message to center on. limit: How many messages to fetch before and after it (1-100, default 20). thread_id: Only messages of this thread (default 0 = the whole conversation). include_system: Also show system messages such as joins and edits (default false).

Returns: One line per message, oldest first, in the same "[id] author: text" form as get_messages; the requested message's line is marked with ">>".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
tokenYes
thread_idNo
message_idYes
include_systemNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.0

TDQS

A4.6/5.0
Behavior4/5

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

Adds genuinely useful behavior beyond the annotations: reading context leaves the read marker and notifications unchanged. This is impactful for an agent deciding whether calling it has side effects. It aligns with readOnlyHint/idempotentHint rather than contradicting them.

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?

Front-loaded purpose sentence, then a short behavioral note, then Args and Returns blocks. Given 0% schema coverage the parameter list is necessary, and every line earns its place with no redundant prose.

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?

Despite an output schema existing, the description usefully previews the return shape (one line per message, oldest first, '[id] author: text' format, '>>' marking the target). Combined with the 5-parameter documentation, an agent has everything needed to call and interpret it.

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%, so the description carries the full load, and it does: it explains limit's 1-100 range and default 20, thread_id's default 0 meaning the whole conversation, and include_system's default false with example system events. This fully compensates for the empty 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?

States a specific verb ('Get') and resource ('the messages around one message') with a concrete scenario ('read the discussion a search result or mention is in'). This windowed-context scope is clearly distinguishable from the sibling get_messages, which lists messages wholesale.

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?

Gives a clear triggering scenario (reading the discussion around a search result or mention) that tells the agent when this tool is appropriate. It does not explicitly name get_messages as the alternative or state when not to use it, so it stops short of full routing guidance.

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

Deploy Server

Other Tools