Skip to main content
Glama

Count unread messages

chat_unread
Read-onlyIdempotent

Counts unread chat messages for the signed-in member without returning or altering them, giving a cheap check for new activity before fetching messages.

Instructions

Counts the chat messages the signed-in member has not read yet, without returning them or changing anything. Returns count (capped at 99), exactCount and overflow (true from 100 unread). Use it for a cheap check before chat_messages; clear the count with chat_mark_read.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "chat_unread"
  }
}

Input Schema

NameRequiredDescriptionDefault
wgCodeNoShare code of the flat (code from wg_list). Leave it out when the account belongs to one flat.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare read-only and idempotent behavior, but the description adds substantive return-value context: count capped at 99, exactCount, and overflow true from 100 unread. It also clarifies that messages are not returned and nothing is changed.

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 three tight sentences with the count semantics and workflow guidance front-loaded. Every sentence contributes useful information about output shape, safety, or sibling routing.

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 simple read-only count tool with no output schema, the description covers return fields, the 99 cap, overflow behavior, and how it relates to chat_messages and chat_mark_read. The remaining parameter detail is already fully covered by the schema.

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 only parameter, wgCode, is fully documented in the schema, including when to omit it. The description adds no further meaning about that parameter, so the adequate baseline of 3 applies.

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 states a specific verb and resource: counts unread chat messages for the signed-in member. It distinguishes this from chat_messages and chat_mark_read by explaining that it neither returns messages nor changes anything.

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?

It gives explicit usage guidance: use it as a cheap check before chat_messages, and clear the count with chat_mark_read. Both the when-to-use condition and the complementary tool for the next step are named.

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