Skip to main content
Glama

mark_unread

Idempotent

Marks one or more Gmail threads as unread in a single call, with per-thread results so you can confirm exactly which threads changed or failed.

Instructions

Mark a thread as unread. 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: adds UNREAD; reversible via 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": "mark_unread"
  }
}

Input Schema

NameRequiredDescriptionDefault
threadIdNo
threadIdsNo

Output Schema

NameRequiredDescriptionDefault
okYes
failedNo
changedNo
notAttemptedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +}
  2. First observedv0.1.8

TDQS

A4.4/5.0
Behavior4/5

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

Adds real context beyond the annotations: it declares the concrete side effect (adds UNREAD) and its reversibility via `mark_read`, plus partial-failure semantics (per-thread `failed` with code/message while others still run; `notAttempted` on rate limit, dead token or missing scope). Since an output schema exists, the enumeration of result fields is partly redundant, which keeps this at 4 rather than 5.

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 the core action, then bulk behavior, then failure semantics, then side effects. Dense but every clause carries information; the long parenthetical about `notAttempted` causes is slightly heavy but justified by the partial-success behavior it discloses.

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 single and batch invocation, failure modes, idempotency-adjacent side effects, and reversibility — everything an agent needs to call it correctly. With an output schema present and annotations covering safety flags, nothing material is missing.

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% and the params carry no descriptions, so the prose must compensate — it does, explaining the single vs list form and the 100-item cap. It does not state whether the two parameters are mutually exclusive or which one wins if both are given, leaving a real ambiguity.

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 ('Mark a thread as unread') and immediately contrasts single-thread vs bulk usage via `threadIds`. It also names the sibling inverse operation (`mark_read`), so an agent can tell it apart from `mark_read` and from bulk tools without opening a schema.

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?

Explicit routing guidance for the bulk path: pass `threadIds` (up to 100) instead of `threadId` to apply the change to every listed thread in one call. It stops short of saying when to prefer the bulk form over looping single calls, or what happens if both/neither id parameter is supplied.

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