Skip to main content
Glama

Mailrun Agent Identity

Read attachment

get_message_attachment
Read-onlyIdempotent

One attachment. representation=auto (default) returns extracted text for PDF/DOCX, a native image block for supported small images, or metadata plus an original-bytes descriptor; text forces extraction; image forces a native image; original returns the unchanged bytes descriptor for read_content(as=bytes). The original file is always retrievable.

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": {
      "identity_id": "<identity_id>",
      "message_id": "<message_id>",
      "attachment_id": "<attachment_id>"
    },
    "name": "get_message_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
message_idYes
identity_idYesIdentity id from list_identities.
attachment_idYes
representationNoauto

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so the safety profile is covered. The description adds real behavior beyond that: auto mode may silently degrade to metadata plus a descriptor rather than content, image support is limited to 'supported small images', and 'The original file is always retrievable' promises a fallback path. It does not cover failure modes (missing attachment, extraction errors, size caps on the descriptor).

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

Conciseness4/5

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

The definition is dense but front-loaded: the return contract and default come first, mode-by-mode semantics next, and the retrievability guarantee last. Semicolon-compressed clauses ('text forces extraction; image forces a native image') are efficient rather than wasteful, though the leading fragment reads slightly clipped.

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?

There is no output schema, so the description must describe return values and does so for all four modes, including the fallback descriptor shape. Given four parameters, an enum, and read-only annotations, the remaining gap is error/edge-case behavior rather than core calling information.

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 only 25% (only identity_id is documented in-schema), so the description must carry weight, and it does fully explain the one ambiguous parameter, the representation enum, including its default and downstream effect. However, message_id and attachment_id receive no added semantics beyond their names, and there is no hint on where attachment_id comes from (presumably get_message).

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 definition states a specific verb and resource ('One attachment' returned, with the three possible return forms spelled out: extracted text, native image block, or metadata plus an original-bytes descriptor). The opening fragment 'One attachment.' is terse, but the representation sentence immediately makes the tool's output contract concrete. It also distinguishes itself from read_content by naming the as=bytes path that consumes the original descriptor.

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?

Each representation value is explained with its selection condition: auto is the default fallback chain, text forces extraction, image forces a native image block, and original is explicitly for handing bytes to read_content(as=bytes). That is clear context for choosing among modes. It lacks guidance on when to call this tool versus get_message for the message body, or what to do when an attachment is not extractable.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources