Skip to main content
Glama

get_last_interaction

Retrieve the last cached WhatsApp message exchanged with a contact or group using a phone number or JID to check the previous interaction.

Instructions

Most recent cached message exchanged with a contact or group.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "chat": "<chat>"
    },
    "name": "get_last_interaction"
  }
}

Input Schema

NameRequiredDescriptionDefault
chatYesChat: phone number like +911234567890, or a JID (…@s.whatsapp.net, …@g.us).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden, and the word 'cached' is a genuinely useful disclosure that results come from a local cache and may be stale. However, it says nothing about what happens when no cached message exists (null vs. error), permission requirements, or the shape of the returned message.

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?

A single short clause with no filler, and the 'most recent cached' constraint is front-loaded. It is arguably too terse and grammatically a fragment rather than a complete statement, but nothing is wasted.

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?

For a one-parameter read lookup with no output schema or annotations, the definition covers the essential input and the caching caveat but omits the empty-result behavior and return shape. It is minimally adequate rather than complete.

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?

Schema description coverage is 100% and the single parameter already documents accepted phone-number and JID formats. The description only echoes that the chat may be a contact or a group, adding little beyond the schema, so the baseline of 3 applies.

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 identifies a specific resource and scope: the single most recent cached message for a contact or group. The 'most recent' qualifier implicitly separates it from the broader get_messages sibling, though the fragment lacks an explicit verb and never names alternatives.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance and no sibling is named, even though get_messages, get_message_context, and get_new_messages all overlap. The use case is only inferable from the phrase 'most recent'.

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