Skip to main content
Glama

AIsa Agent Mail

Get Any Thread Attachment

get_agentmail_thread_attachment
Read-onlyIdempotent

Fetches metadata for one attachment in a thread addressed by id alone. Returns attachment_id, filename, size, content_type, content_disposition, content_id and a short-lived download_url with expires_at. The bytes are not inlined — fetch download_url before it expires. This is the organization-wide view spanning every inbox in the account. Every AIsa caller shares one AgentMail account, so this reaches inboxes other callers created; the inbox-scoped twin get_agentmail_inbox_thread_attachment is the one to use when a single inbox is meant.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thread_idYesID of thread.
AuthorizationYesBearer authentication
attachment_idYesID of attachment.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already cover readOnly, idempotent, and openWorld hints. The description adds valuable context: the bytes are not inlined and the `download_url` has a short expiry, and it clarifies the scope reaches all inboxes due to a shared account. No contradiction with annotations.

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?

The description is front-loaded with the core action, then explains the scope and the twin. Each sentence adds a distinct piece of information—return fields, expiration, scope, and alternative—with no filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

It fully covers what the tool returns, the critical download_url expiration behavior, the scope across all inboxes, and the alternative for inbox-scoped use. With an output schema present, return values are already documented, so nothing needed by an agent is missing.

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% and each parameter already has a description. The description adds only that the thread is 'addressed by id alone', which is implied by the schema. It does not add format or syntax details beyond the schema, so baseline 3 applies.

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 states a specific verb ('Fetches') and resource ('metadata for one attachment in a thread') and explicitly differentiates from the sibling by noting it's the organization-wide view vs the inbox-scoped twin. This makes it unambiguous which tool to pick even without opening the schema.

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

Usage Guidelines5/5

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

It names the alternative `get_agentmail_inbox_thread_attachment` and gives the condition for choosing it ('when a single inbox is meant'), plus explains the shared-account caveat. It also advises to fetch `download_url` before it expires, which is actionable usage guidance.

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