Skip to main content
Glama

archive

Idempotent

Removes handled email threads from the inbox for triage, using reversible label changes; pass up to 100 thread IDs to batch the action in one call.

Instructions

Archive a thread (remove it from the inbox). USE WHEN: inbox triage — the thread is handled and should leave the inbox. DO NOT USE: to delete (use trash) or to defer to a date (use snooze). Pass threadIds (a list of up to 100) instead of threadId to apply the same change to every listed thread in one call — for 'exactly these threads, as approved'. The answer then reports per thread: changed, failed (with code and message; the others still ran) and notAttempted (the run stopped at a rate limit, dead token or missing scope, which would have hit every remaining thread alike); ok is true only when all were changed. SIDE EFFECTS: thread leaves the inbox; reversible via modify_labels add INBOX.

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

Input Schema

NameRequiredDescriptionDefault
threadIdNo
threadIdsNo

Output Schema

NameRequiredDescriptionDefault
okYes
failedNo
changedNo
notAttemptedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.32.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed6 schema fields changedv0.25.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / threadIds
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "minItems": 1,
      +  "type": "array"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "threadId"
      -]
    • addedOutput schema / properties / changed
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / failed
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "code": {
      +        "type": "string"
      +      },
      +      "message": {
      +        "type": "string"
      +      },
      +      "retryable": {
      +        "type": "boolean"
      +      },
      +      "threadId": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "threadId",
      +      "code",
      +      "message",
      +      "retryable"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / notAttempted
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  3. First observedv0.1.8

TDQS

A4.6/5.0
Behavior4/5

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

Goes well beyond the annotations (readOnly=false, destructive=false, idempotent=true) by disclosing side effects, reversibility via modify_labels add INBOX, and partial-failure semantics (failed threads still let others run, notAttempted on rate limit/dead token/missing scope, ok only when all changed). That is exactly the operational context annotations cannot convey. It stops short only of stating per-thread failure recovery guidance.

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 use/skip rules, then bulk-param guidance, then result semantics — logical and scannable. It is dense and its per-thread result explanation (`changed`/`failed`/`notAttempted`/`ok`) duplicates the existing output schema, which is the one portion that does not earn its space.

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?

Covers purpose, exclusion routing, bulk-parameter behavior, side effects, reversibility, and failure modes for a mutating tool with only two optional parameters. Despite 0% schema coverage and no required parameters, an agent has everything needed to call this correctly and interpret partial failures.

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 0%, so the description must carry parameter meaning — and it largely does: `threadIds` is documented as a list of up to 100 applied in one call, positioned as a substitute for `threadId`. It does not explain the singular `threadId` form explicitly or note that neither parameter is required, leaving a small gap.

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?

"Archive a thread (remove it from the inbox)" states a specific verb and resource plus the concrete effect. It also distinguishes itself from `trash` and `snooze` by name, so an agent can route correctly without opening sibling schemas.

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?

Explicit USE WHEN (inbox triage, thread handled) and DO NOT USE (delete → trash, defer → snooze) clauses name the alternative tools directly. The trigger condition is concrete rather than inferred.

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