Skip to main content
Glama

Message context

get_message_context

The messages surrounding one message id — use it after search_messages to see what a hit was answering.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chatYesChat JID.
afterNo
beforeNo
message_idYesMessage id, as returned by search_messages.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the full burden of behavioral disclosure. The description only says it provides surrounding messages, but does not state whether it modifies state (it is likely a read, but not stated), whether it can fail (e.g., message not found), or any rate limits. It also does not mention the 'after' and 'before' parameters, which directly control the number of surrounding messages. This is a significant gap for a tool that expects to be called after search_messages.

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 a single, concise sentence that gets straight to the point. It is front-loaded with the core purpose and immediately provides usage guidance. No wasted words.

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

Completeness2/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 (4 parameters, 2 optional with defaults), the description is incomplete. It does not explain the meaning of 'before' and 'after' (likely counts of messages) or their bounds. It does not describe the return format, which is important for an agent to know if it can use the response. No annotations or output schema exist to fill these gaps. The description is too short for an agent to confidently invoke it without guessing parameter semantics.

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?

The schema description coverage is 50%, meaning the 'chat' and 'message_id' parameters are already described in the schema. The description does not add any details for these parameters. It does not explain 'after' and 'before' parameters, which are not described in the schema. With 50% coverage, the description should compensate for the undocumented parameters but fails to do so. Baseline is 3, and it remains there because it does not add value beyond the schema.

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

Purpose4/5

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

The description clearly states the tool's purpose: fetching surrounding messages for a given message id. It specifies a distinct resource ('messages surrounding one message id') and differentiates it from sibling tools like search_messages by implying it is a follow-up to search results. It does not explicitly name the sibling it is not, so it loses a point against the highest standard.

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 explicitly states when to use this tool: after search_messages, to see what a hit was answering. This provides clear context of its place in a workflow. However, it does not mention alternatives or when not to use it, so it is not quite a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.