Skip to main content
Glama
mail-mcp

mail-mcp

by honest-magic

extract_attachment_text

Read-only

Extracts readable text from PDF or plain-text email attachments fetched via IMAP, enabling direct processing of attachment content without manual downloads.

Instructions

Extract readable text from a PDF or plain-text email attachment — fetched via IMAP from any provider.

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": {
      "accountId": "<accountId>",
      "uid": "<uid>",
      "filename": "<filename>"
    },
    "name": "extract_attachment_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
uidYesThe UID of the email
folderNoThe folder containing the email (default: INBOX)
filenameYesThe name of the attachment file
accountIdYesThe ID of the account to use

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds genuine context by noting the file is fetched via IMAP and works 'from any provider,' but it omits what happens for scanned/image PDFs with no text layer, size limits, and failure behavior on unsupported types.

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?

A single front-loaded sentence that names the action, the accepted file types, and the retrieval mechanism, with no filler. The em-dash clause about IMAP carries real information rather than padding.

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 read-only extraction tool with no output schema, the description adequately signals that the result is readable text. Minor gaps remain around size limits, failure modes, and whether the whole document or a truncated portion is returned.

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 100% with all four parameters documented, so the baseline is 3. The description adds the notion that the attachment belongs to an email (justifying uid + folder + filename as a locator) but does not explain how filename is disambiguated within a message or what folder defaulting implies beyond the schema.

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: 'Extract readable text' from 'a PDF or plain-text email attachment.' It also narrows the scope to IMAP-fetched attachments, which distinguishes it from generic mail reads, but it never contrasts with the sibling get_attachment, which is the nearest alternative (raw download vs. text extraction).

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 only implied: an agent can infer it should call this when it needs the text body of a PDF or text file. There is no explicit when-not guidance, no statement about unsupported formats, and no pointer to get_attachment for binary or other attachment types.

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