Skip to main content
Glama
DimitrisPasakaleris

WhatsApp MCP Server

get_message_context

Retrieve surrounding WhatsApp messages by message ID to understand conversation context, with configurable counts before and after and optional chat JID disambiguation.

Instructions

Get context around a specific WhatsApp message.

Args: message_id: The ID of the message to get context for before: Number of messages to include before the target message (default 5) after: Number of messages to include after the target message (default 5) chat_jid: Chat containing the message; required when its ID occurs in multiple chats

Input Schema

NameRequiredDescriptionDefault
afterNo
beforeNo
chat_jidNo
message_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.7/5.0
Behavior3/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. 'Get' implies a read-only operation and the before/after defaults hint at the bounded window behavior, which is useful. It doesn't state what happens for an unknown message_id, ordering of returned messages, or any limits on before/after values.

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?

A single front-loaded summary sentence followed by a compact Args list; every line adds information (including defaults and the conditional chat_jid rule) with no redundancy.

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?

An output schema exists, so return-value explanation isn't needed, and all four parameters are documented with defaults and conditionality. The only gaps are edge-case behavior (unknown/missing message, window ordering) for a tool whose read-only nature is only implied.

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 supply all parameter meaning — and it does, explaining message_id, the before/after counts with their default of 5, and the conditional requirement on chat_jid. It doesn't specify valid ranges for before/after, which would be the final increment.

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?

States a specific verb and resource: 'Get context around a specific WhatsApp message', which is clearly a windowed read around one message. This is distinguishable from sibling list_messages by the 'around a specific message' framing, though the description doesn't name the sibling as an alternative.

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

Usage Guidelines3/5

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

Usage is implied by the resource ('context around a message'), and the chat_jid arg note gives a conditional usage hint ('required when its ID occurs in multiple chats'). However, there is no explicit when-to-use-this vs list_messages guidance and no stated preconditions for resolving a message_id.

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