Skip to main content
Glama

Archive messages

archive_messages

Archives the person's messages (moves them out of the inbox, nothing is deleted). Messages the person picked: pass each row's inboxId and messageId from show_inbox (the id block at the end of its text, or structuredContent.rows), usually by row number ("archive 2 and 5"). Or pass sender { inboxId, email } to act on that sender's mail still in the inbox, like "archive everything from 2" after review_unsubscribes (up to 50 newest per call). Prefer this over trash. For more than 5 messages, a call without confirmed:true changes nothing and returns { needsConfirmation: true, count, bySender, sayToHuman }: show sayToHuman, then call again with the same items/sender and confirmed:true once the human agrees. More than 25 messages is a preview first: nothing moves and you get { preview: true, count, topSenders, samples, confirmToken }; ask the person, then call again with the same arguments plus confirmToken. Past 500 messages moved in an hour the person is asked directly, or you get { needsApproval: true, approvalUrl }: give them the link and do not split the move into smaller calls. Mail from a VIP is skipped when you act on several messages. Act on a VIP's message alone, and only after the person agrees: in apps that can prompt the person, they are asked directly; otherwise ask in chat and pass vipConfirmed:true. Reporting spam is not done here: it goes through propose_mark_spam then confirm_mark_spam, one message at a time. Work on your own only on a clear instruction or a saved agentRules rule; otherwise suggest and wait. The result has an undoId for undo_view_action, which works once, for 7 days; report counts and the undoId.

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": "archive_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsNo
senderNoInstead of items: every message from this sender still in the inbox
confirmedNoMore than 5 messages: true once the person agreed to the count/sender breakdown a first call without it returned. Not needed for 5 or fewer.
confirmTokenNoMore than 25 messages: the confirmToken a first call returned in its preview, after the person agreed. Single use, 15 minutes.
vipConfirmedNotrue only after the person agreed in chat to act on this one VIP message

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare destructiveHint=false and idempotentHint=false, and the description is consistent with that, adding real context: 'nothing is deleted', the 5/25/500-message confirmation ladders with exact return payloads, VIP skipping and vipConfirmed gating, and a single-use 7-day undoId. This is well beyond what the annotations convey.

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-loaded with purpose, then progressively deeper policy, so an agent can stop reading early. It is still one dense ~250-word block covering seven distinct policies, and would scan faster as short labeled lines; every sentence is nevertheless decision-relevant 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, so the description carries return-value responsibility — and it does, describing needsConfirmation, preview/confirmToken, needsApproval/approvalUrl, and undoId. For a nested-object, multi-mode mutation tool with zero required params, nothing an agent needs in order to call it safely is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 80%, yet the description still adds value the schema does not: where items values come from (show_inbox's id block or structuredContent.rows), that sender targets 'every message from this sender still in the inbox' capped at 50 newest, and the exact lifecycle of confirmed and confirmToken relative to the returned payloads. Beyond the baseline 3 for high coverage.

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?

Opens with a specific verb and resource plus a scope clarification: 'Archives the person's messages (moves them out of the inbox, nothing is deleted).' It then explicitly differentiates from siblings — 'Prefer this over trash' and 'Reporting spam is not done here: it goes through propose_mark_spam then confirm_mark_spam' — so an agent can separate it from trash_messages, propose_mark_spam, and confirm_mark_spam without opening any 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?

Names concrete alternatives and the conditions that select them: items from show_inbox vs sender from review_unsubscribes, archive instead of trash, spam via a different two-step flow. It also states the autonomy policy ('Work on your own only on a clear instruction or a saved agentRules rule; otherwise suggest and wait'), removing the main ambiguity for an agent.

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