Skip to main content
Glama
gmail-mcp

gmail-mcp

by cart1984

mail_attachment

Read-only

Reads one email attachment as text by its attachment number from a message, converting PDF, Word, Excel, PowerPoint, and similar files into readable content.

Instructions

Read one attachment as text, by its number in mail_get (PDF, Word, Excel, PowerPoint and more are converted; a forwarded mail is shown like mail_get shows a message).

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": {
      "message_id": "<message_id>",
      "attachment": "<attachment>"
    },
    "name": "mail_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
attachmentYes
message_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered. The description does add real behavioral value by disclosing that binaries are converted to text and that a forwarded mail is rendered like mail_get renders a message, but it says nothing about unsupported formats, size limits, or failure behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One sentence, front-loaded with the action and resource, with the parenthetical covering conversion scope and the forwarded-mail edge case. Nothing is wasted and nothing is buried.

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?

An output schema exists, so return-value explanation is not required, and the description covers the two non-obvious behaviors (format conversion, forwarded-mail rendering). The remaining gap is the undefined message_id parameter for a two-required-parameter tool.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must carry the load alone. It explains that 'attachment' is the number reported by mail_get, which is the key semantic, but leaves 'message_id' (format, source) entirely undefined in both schema and description.

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 ('Read one attachment as text') and adds the mechanism ('by its number in mail_get'), which cleanly separates it from mail_get itself and from listing tools like mail_list/mail_search.

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?

The phrase 'by its number in mail_get' implicitly tells the agent the prerequisite step: call mail_get first to obtain the attachment number. It gives clear context for when to reach for this tool over reading the message body, though it never explicitly names an alternative or a when-not condition.

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