Skip to main content
Glama
Mailbuttons MCP Server

Mailbuttons MCP Server

Official
by mailbuttons

Extract attachment text

mailbuttons_get_attachment_text
Read-onlyIdempotent

Extract inline text from email attachments such as plain text and CSV files; PDF and binary attachments return an error with a next-step message.

Instructions

Extract inline text from a message attachment (text/* and text/csv). PDF and other binary types are not extracted yet and return an error with a next step. Read-only; requires the attachments capability.

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": {
      "email_id": "<email_id>",
      "blob_id": "<blob_id>",
      "inbox_id": "<inbox_id>"
    },
    "name": "mailbuttons_get_attachment_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
blob_idYesAttachment blob id (from message attachments meta).
email_idYesJMAP email id the attachment belongs to.
inbox_idYesInbox (mailbox) id. Must be in scope for the token.

Output Schema

NameRequiredDescriptionDefault
textNoExtracted text for text/* and text/csv attachments.
errorNoSet when extraction is unsupported, e.g. "pdf_extraction_not_enabled".
filenameNo
next_stepNo
content_typeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.4

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, non-destructive, and openWorld, so the safety profile is covered. The description adds genuinely new context beyond them: the required `attachments` capability (an authorization precondition) and the partial-failure behavior for unsupported types, which is exactly the kind of runtime trait an agent needs.

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 sentences, with the core action and supported types front-loaded before the limitation and the capability requirement. Every clause carries information; nothing is redundant.

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 values need no explanation, and the description covers the capability requirement and failure mode, which are the main non-schema unknowns. A minor gap: it does not mention limits on attachment size or whether extraction is idempotent across repeated calls, though annotations handle the latter.

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 100% and all three parameters are documented in-schema, so the baseline applies. The description adds no per-parameter meaning (e.g. where blob_id comes from beyond the schema's note, or inbox scoping behavior).

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?

The description names a specific verb and resource ("Extract inline text from a message attachment") and bounds the scope with explicit MIME types (text/* and text/csv). It does not name a sibling for contrast, but the type restriction makes the tool's domain unambiguous.

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 context is implied through the exclusion of PDF/binary types and the note that they return an error with a next step, which nudges the agent toward that follow-up. There is no explicit statement of when to choose this tool over an alternative (e.g. mailbuttons_extract_code), so guidance is implied rather than stated.

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