Skip to main content
Glama
grrek
by grrek

message_context

Retrieve surrounding messages around a specific WhatsApp message ID to provide conversation context. Specify how many messages to show before and after the target message for better understanding of chat flow.

Instructions

Show surrounding messages around a specific message ID for context.

Args:
    message_id: The message ID to center on
    chat: Chat JID where the message is
    before: Number of messages before (default 5)
    after: Number of messages after (default 5)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
message_idYes
chatYes
beforeNo
afterNo
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the tool shows messages, implying a read-only operation, but doesn't disclose behavioral traits like whether it requires specific permissions, rate limits, error conditions, or what the output format looks like (e.g., list of messages with metadata). This is a significant gap for a tool with no annotation coverage.

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 appropriately sized and front-loaded: the first sentence states the core purpose, followed by a bullet-like 'Args:' section that efficiently explains parameters. Every sentence earns its place with no wasted words, making it easy to scan and understand.

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

Completeness3/5

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

Given 4 parameters with 0% schema coverage and no output schema, the description does well on parameters but lacks behavioral context (e.g., output format, error handling). It's complete enough for basic usage but inadequate for full agent understanding, especially without annotations to cover safety or performance traits.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate. It adds clear meaning beyond the schema by explaining all 4 parameters: 'message_id' as the center point, 'chat' as the location, and 'before'/'after' as counts with defaults. This fully documents the parameters, though it doesn't specify units or constraints (e.g., max values).

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 tool's purpose with a specific verb ('Show') and resource ('surrounding messages around a specific message ID'), distinguishing it from siblings like 'show_message' (which shows a single message) and 'list_messages' (which lists messages without centering on one). The phrase 'for context' adds useful nuance about the tool's intent.

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 implies usage context by specifying it centers on a message ID to get surrounding messages, which distinguishes it from tools like 'show_message' (single message) or 'list_messages' (general listing). However, it doesn't explicitly state when NOT to use it or name alternatives, missing full explicit guidance.

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/grrek/mcp-wacli'

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