Skip to main content
Glama

Change messages

update_messages
DestructiveIdempotent

Modify mail in one account in bulk: mark read/unread, star, move, archive, label, add/remove keywords, or trash, then report which IDs succeeded or failed.

Instructions

Change mail of one account: mark read or unread, star, move, archive, label, add and remove keywords, or put into the trash. Where a mail can be in several folders at once, add_folders puts it in one more and leaves it where it is, remove_folders takes it out of one, and remove_folders inbox archives it. Ids stay the same after a move. trash moves mail to the trash and deletes nothing for good. Answers which ids were done and which failed, with the reason.

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": {
      "account_id": "<account_id>",
      "message_ids": "<message_ids>"
    },
    "name": "update_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
trashNoInto the trash, alone and without other changes
unreadNotrue: mark unread. false: mark read
move_toNoFolder id, or a role such as archive, inbox, junk. Not drafts
starredNotrue: star. false: take the star off
account_idYesThe account, by the id list_accounts names
add_foldersNoFolder ids or roles. Only where a mail can be in several folders at once
message_idsYesMails of that account, by the ids search_messages answers
add_keywordsNoKeywords: a word of your own, or a mark among the account's marks_written, such as $junk
remove_foldersNoFolder ids or roles. Only where a mail can be in several folders at once
remove_keywordsNoKeywords: a word of your own, or a mark among the account's marks_written, such as $junk

Output Schema

NameRequiredDescriptionDefault
doneYes
failedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.9.0
    • changedInput schema / properties / move_to / description
      Previous value: -"Folder id, or a role such as archive, inbox, junk"New value: +"Folder id, or a role such as archive, inbox, junk. Not drafts"
  2. Changed6 schema fields changedv0.8.0
    • addedOutput schema / $defs
      Added value: +{
      +  "Failure": {
      +    "description": "A message a batch could not change, and why.",
      +    "properties": {
      +      "error": {
      +        "title": "Error",
      +        "type": "string"
      +      },
      +      "id": {
      +        "title": "Id",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "error"
      +    ],
      +    "title": "Failure",
      +    "type": "object"
      +  }
      +}
    • removedOutput schema / additionalProperties
      Removed value: -true
    • addedOutput schema / description
      Added value: +"A batch: the ids done, and per failed id why not."
    • addedOutput schema / properties
      Added value: +{
      +  "done": {
      +    "items": {
      +      "type": "string"
      +    },
      +    "title": "Done",
      +    "type": "array"
      +  },
      +  "failed": {
      +    "items": {
      +      "$ref": "#/$defs/Failure"
      +    },
      +    "title": "Failed",
      +    "type": "array"
      +  }
      +}
    • addedOutput schema / required
      Added value: +[
      +  "done",
      +  "failed"
      +]
    • changedOutput schema / title
      Previous value: -"update_messagesDictOutput"New value: +"Outcome"
  3. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, and the description usefully narrows the destruction claim ('trash moves mail to the trash and deletes nothing for good'), tells the agent ids are preserved across moves, and discloses partial-failure reporting ('which ids were done and which failed, with the reason'). It does not cover permission requirements or atomicity of multi-parameter calls, so it adds meaningful but not exhaustive context.

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?

Capabilities are front-loaded and each sentence carries content, but the folder sentence is a run-on ('add_folders puts it in one more and leaves it where it is, remove_folders takes it out of one, and remove_folders inbox archives it') that would read better as discrete clauses. No filler sentences otherwise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 10 parameters, full schema coverage, an output schema and explicit annotations, the description covers the semantics an agent needs: the folder-parameter interplay, trash behavior, id stability, and partial-failure results. Missing only secondary details such as permission prerequisites and whether a combined call is all-or-nothing.

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 description coverage is 100%, so the baseline is 3; the description goes beyond it by explaining the interaction between move_to, add_folders and remove_folders and by noting the inbox-archive shortcut. That resolves a genuine ambiguity the schema alone leaves (when to move vs. add/remove folders) without restating field types.

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 plus resource ('Change mail of one account') and then enumerates the concrete operations: mark read/unread, star, move, archive, label, add/remove keywords, trash. An agent can tell this is a batch mutation tool on messages without opening the schema, and the 'deletes nothing for good' clause separates it from any permanent-delete behavior.

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

Usage Guidelines4/5

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

Gives real operational guidance for choosing among the mutating parameters: add_folders adds a location and leaves the mail where it is, remove_folders removes it from one, remove_folders inbox archives, and move_to relocates while ids stay the same. It stops short of naming when to use this instead of a sibling such as update_draft, so tool-level selection is left implicit.

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