Skip to main content
Glama

Dayze — Life Context

Read Gmail Message (read-only)

read_gmail_message
Read-only

Read one Gmail message by id from search_gmail. Returns subject, from, canonical date, account-local date_local, time_zone, snippet, plain-text body (truncated), and attachments[] metadata (attachment_id, filename, mime_type, size). Use read_gmail_attachment for text/csv/vcf contents. Optional account when multiple mailboxes. On failure returns code gmail_read_failed with retryable: retry once only when retryable; if the newest message still cannot be read, say so and never present an older one as the latest. Read-only. Requires mail.read on an API key or non-ChatGPT OAuth connection. ChatGPT profiles do not grant mail.read or list this tool. Share tokens cannot call. ($0.10; API key required)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoAlias for message_id
emailNoAlias for account
accountNoMailbox selector (email or connection id)
message_idYesGmail message id from search_gmail

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedOutput schema / properties / message / properties / date_local
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / message / properties / time_zone
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / properties / message / required
      Previous value: -[
      -  "id",
      -  "subject",
      -  "from",
      -  "date",
      -  "snippet",
      -  "body",
      -  "body_truncated",
      -  "attachments"
      -]New value: +[
      +  "id",
      +  "subject",
      +  "from",
      +  "date",
      +  "date_local",
      +  "time_zone",
      +  "snippet",
      +  "body",
      +  "body_truncated",
      +  "attachments"
      +]
  2. Changed3 schema fields changed
    • addedInput schema / properties / account
      Added value: +{
      +  "description": "Mailbox selector (email or connection id)",
      +  "type": "string"
      +}
    • addedInput schema / properties / email
      Added value: +{
      +  "description": "Alias for account",
      +  "type": "string"
      +}
    • changedOutput schema / properties / message / properties / date / type
      Previous value: -[
      -  "string",
      -  "null"
      -]New value: +"string"
  3. Changed2 schema fields changed
    • addedOutput schema / properties / message / properties / attachments
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "attachment_id": {
      +        "type": "string"
      +      },
      +      "filename": {
      +        "type": "string"
      +      },
      +      "mime_type": {
      +        "type": "string"
      +      },
      +      "size": {
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "attachment_id",
      +      "filename",
      +      "mime_type",
      +      "size"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / message / required
      Previous value: -[
      -  "id",
      -  "subject",
      -  "from",
      -  "date",
      -  "snippet",
      -  "body",
      -  "body_truncated"
      -]New value: +[
      +  "id",
      +  "subject",
      +  "from",
      +  "date",
      +  "snippet",
      +  "body",
      +  "body_truncated",
      +  "attachments"
      +]
  4. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "message": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "body": {
      +          "type": "string"
      +        },
      +        "body_truncated": {
      +          "type": "boolean"
      +        },
      +        "date": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "from": {
      +          "type": "string"
      +        },
      +        "id": {
      +          "type": "string"
      +        },
      +        "snippet": {
      +          "type": "string"
      +        },
      +        "subject": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "subject",
      +        "from",
      +        "date",
      +        "snippet",
      +        "body",
      +        "body_truncated"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "message"
      +  ],
      +  "type": "object"
      +}
  5. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, openWorldHint=false, but the description goes far beyond them: it discloses the gmail_read_failed error code, a bounded retry rule ('retry once only when retryable'), and rules against presenting an older message as the latest. It also states the permission model (mail.read via API key/OAuth, ChatGPT profiles excluded, share tokens not allowed) and cost. Very strong, though the return-format list partly duplicates the output 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-loaded with purpose, then return shape, alternative, error/retry behavior, and permissions in a compact run. Nearly every clause earns its place, though the returned-field enumeration and the pricing tail add length that the output schema and error contract already partly cover.

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?

For a read tool with an output schema, the description still covers everything an agent needs to call it correctly: id origin, account handling, alternative tool routing, failure code, retry limits, and auth prerequisites. No material gap remains.

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 100%, so the baseline is 3, but the description adds real meaning: message_id provenance ('from search_gmail') and the conditional behavior of account ('Optional account when multiple mailboxes'). The alias parameters (id, email) are left to the schema, which is acceptable given full 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?

States a specific verb+resource ('Read one Gmail message by id') and immediately scopes it against siblings by naming search_gmail as the id source and read_gmail_attachment as the alternative for attachment contents. An agent can distinguish it from both 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 Guidelines5/5

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

Explicitly routes the read-by-id case here and text/csv/vcf extraction to read_gmail_attachment, and notes 'Optional account when multiple mailboxes.' The alternative and the condition selecting it are both stated.

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.