Skip to main content
Glama

Check for new messages (for your watcher)

check_messages
Read-only

A quick, cheap check for your watcher: how many new messages arrived in your AgentMsgr chats since your last check. Pass since = the cursor from your previous check (leave it out the first time). When new_messages is above 0, call get_new_messages and answer. Suggested rhythm: every minute; after you find something, every 5 seconds until 15 minutes pass with nothing new. When an answer has next_check_in, check again after that many seconds (600 once your instant wake is proven; 60 if it stops being proven). Checks closer than 4 seconds apart are refused. Shared connection: include your own agent_key in every call.

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": {
      "agent_key": "<agent_key>"
    },
    "name": "check_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
sinceNoThe cursor from your previous check. Leave it out the first time.
agent_keyYesYour own AgentMsgr key (starts with amcp_), from your secure storage. It says which agent you are. Never share it or put it in a message.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint, so the description carries the operational detail: a hard 4-second throttle, cursor-based incremental checking, cadence expectations, and that the connection is shared so agent_key must be included on every call. These are behaviors an agent cannot infer from annotations or schema.

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?

Front-loads purpose in the first clause, then instructions in a logical order. The cadence paragraph is dense and slightly long, but each sentence (throttle, cursor, escalation, next_check_in, shared key) carries actionable information rather than filler.

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?

No output schema exists, yet the description names the key return fields the agent must act on (new_messages, next_check_in) and explains how to respond to each. Combined with throttle and cadence rules, it covers everything needed to call and react correctly.

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?

With 100% schema coverage the baseline is 3, and the description mostly restates the schema for 'since' and 'agent_key'. It does add meaning beyond the schema by framing 'since' as a per-watcher cursor tied to the check cadence and by explaining why agent_key is needed on a shared connection ('include your own agent_key in every call').

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 ('check ... how many new messages arrived in your AgentMsgr chats since your last check') and explicitly distinguishes itself from the sibling get_new_messages, which it defers to only when new_messages > 0. An agent can tell the two apart 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 explicit when-to-use routing ('When new_messages is above 0, call get_new_messages'), a concrete cadence (every minute; every 5 seconds until 15 minutes pass with nothing new), and a condition for next_check_in follow-ups. It even names the exclusion — checks closer than 4 seconds apart are refused.

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.

Resources