Skip to main content
Glama
Mabus Mailroom

Mabus Mailroom

by dpdanpittman

get_attachment

Read-onlyIdempotent

Extract text from a Gmail message attachment such as a PDF, HTML, or text file; other types return metadata only. Downloads are capped at 5 MB and extracted text at 50,000 characters.

Instructions

Text extract of one attachment (text files, HTML, PDF). Other types return metadata only. Downloads are capped at 5 MB and the returned text at 50,000 characters.

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": "<account>",
      "message_id": "<message_id>",
      "part_id": "<part_id>"
    },
    "name": "get_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
accountYesAccount alias from list_accounts
part_idYespart_id from the attachments list of get_message
message_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, open-world and non-destructive, so the safety profile is covered. The description still earns credit by disclosing concrete operational limits not present in structured fields: a 5 MB download cap and a 50,000-character truncation of returned text, plus the fallback behavior for unsupported types. It stops short of describing error behavior or whether truncation is signalled in the response.

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?

Two short sentences, front-loaded with the core capability and the type scoping, followed by the size/truncation constraints. Every clause carries information an agent would act on; nothing is redundant with the title or name.

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?

For a simple three-required-parameter read tool with no output schema, the definition covers capability, supported types, fallback behavior and payload limits. The remaining gap is the shape of the returned text versus metadata response, which is minor given the tool's simplicity.

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 coverage is 67%, with account and part_id documented in the schema and message_id undocumented. The description adds no meaning to any parameter — no format, no provenance hints beyond 'one attachment'. With moderate coverage the schema does most of the work, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Text extract of one attachment', scoped to text files, HTML and PDF, with the contrast that other types return metadata only. That is enough for an agent to know it targets a single attachment part rather than a whole message, though it never names get_message as the source of part_id or the alternative.

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

Usage Guidelines3/5

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

Usage is implied by the resource itself (fetch one attachment's text) and usefully signals that non-text attachments yield metadata only, which shapes expectations. There is no explicit when-to-use versus when-not, and no statement that part_id must come from get_message's attachment list — that guidance lives only in the schema.

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