Skip to main content
Glama

mark_as_read

Idempotent

Mark a chat as read. Without message_id it marks the latest incoming message (and everything before it). If providing message_id for a group chat, sender_jid must also be provided. The sender sees blue ticks (in one-to-one chats, only if the user has read receipts on), and the chat also shows as read on the user's phone, including a chat marked unread. Reading a chat with read_chat_history doesn't mark it as read; call this only when the user asks.

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": {
      "jid": "<jid>"
    },
    "name": "mark_as_read"
  }
}

Input Schema

NameRequiredDescriptionDefault
jidYesThe chat to mark as read: a JID or a phone number with country code.
message_idNoOptional. A message `id` from read_chat_history; it and everything before it are marked read. Omit to mark the latest incoming message.
sender_jidNoRequired with message_id in group chats: that message's `sender_jid` from read_chat_history.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false, destructiveHint=false, idempotentHint=true, so the safety profile is already carried; the description still adds meaningful side-effect disclosure the annotations cannot: the sender sees blue ticks (subject to the user's read-receipt setting) and the user's phone syncs the read state, including over a manually unread chat. What's missing is any statement about failure behavior (invalid jid, sender_jid missing in a group) or return values, keeping this short of a 5.

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?

Four sentences, front-loaded with the core action, then the parameter default, then the conditional requirement, then the observable side effects and the usage caveat. Every sentence carries distinct information; nothing restates the name or the schema verbatim.

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?

For a three-parameter mutation with no output schema and fully documented parameters, the description covers purpose, defaults, conditional requirements, user-visible effects, and when not to call it. Nothing an agent needs in order to invoke it correctly appears to be absent.

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 coverage is 100%, so baseline is 3; the description earns an increment by explaining the omitted-parameter default (no message_id → latest incoming message and everything before it) and the group-chat coupling between message_id and sender_jid. It does not add format or validation detail for jid itself beyond what the schema already says.

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 and resource ("Mark a chat as read") and immediately delineates scope: the optional message_id marks an anchor point and everything before it, versus the default latest incoming message. It explicitly separates itself from read_chat_history ("Reading a chat with read_chat_history doesn't mark it as read"), so an agent can distinguish it from the nearest sibling without opening either schema.

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

Usage Guidelines5/5

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

Gives an explicit exclusion against a same-category sibling (read_chat_history) and a governance constraint ("call this only when the user asks"). It also states the conditional precondition for group chats — sender_jid is required alongside message_id — which is exactly the kind of branching rule an agent would otherwise get wrong.

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.