Skip to main content
Glama

mail_attachment

Read-only

Extract text from email attachments such as PDF, Word, Excel, CSV, HTML, or .eml by message ID and file name or position. Read attachment content directly for analysis.

Instructions

Read the text of an attachment: PDF, Word (.docx), Excel (.xlsx), text, CSV, HTML or .eml. name is the file name from mail_read, or its position ("1", "2", ...). Scanned PDFs without text cannot be read.

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

Input Schema

NameRequiredDescriptionDefault
nameYes
message_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered by structured data. The description adds genuine value beyond that by disclosing supported formats and one failure mode (text-less scanned PDFs), but it says nothing about truncation, size limits, or what the returned text looks like for large spreadsheets or HTML.

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?

Three short lines with no filler: capability and supported formats first, then parameter form, then the failure caveat. Every sentence earns its place 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?

For a two-parameter read tool with annotations covering safety and no output schema, the definition supplies formats, input sourcing, and a known limitation. The missing pieces are the meaning of `message_id` and any note on very large attachments, which keeps it just under complete.

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 description coverage is 0%, so the description must carry the parameter meaning, and it does a solid job for `name` by specifying both accepted forms (filename from mail_read, or positional index like "1", "2"). `message_id` is left entirely unexplained, which is the one real gap, but the harder-to-guess parameter is well documented.

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?

The description gives a precise verb ("Read the text of an attachment") plus the resource and an explicit enumeration of supported formats (PDF, .docx, .xlsx, text, CSV, HTML, .eml), which makes it trivially distinguishable from mail_read (message body) among the siblings.

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?

It establishes the workflow context by stating that `name` comes from mail_read or is the attachment's position, and it names one exclusion (scanned PDFs without text). It stops short of explicitly saying to call mail_read first or when not to use this tool at all, so a 4 rather than a 5.

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