Skip to main content
Glama

insync_download_attachment

Read-only

Download one attachment from a secure message using its master ID and index from the attachment list; get a local file path, inline file, or signed link.

Instructions

Download one file attached to a secure message. Identify it by the message’s master id and the attachment’s position (index) from insync_list_attachments. On a local install the file is saved to disk and the path returned; on a hosted server it comes back inline (up to 10 MiB), or as a short-lived signed download link when larger. The download goes through the portal — never direct storage.

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": {
      "master_id": "<master_id>",
      "index": "<index>"
    },
    "name": "insync_download_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
indexYesThe attachment’s 0-based position from insync_list_attachments.
master_idYesThe message’s master id (TODOMasterId) from insync_list_messages.
output_dirNoDirectory to save into (local install only; ignored on a hosted server, which returns the file inline or as a link). Defaults to INSYNC_OUTPUT_DIR or ~/Downloads; must resolve inside an allowed root.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.0
    • changedInput schema / properties / output_dir / description
      Previous value: -"Directory to save into (local install only; ignored on a hosted server, which returns bytes inline). Defaults to INSYNC_OUTPUT_DIR or ~/Downloads; must resolve inside an allowed root."New value: +"Directory to save into (local install only; ignored on a hosted server, which returns the file inline or as a link). Defaults to INSYNC_OUTPUT_DIR or ~/Downloads; must resolve inside an allowed root."
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the readOnly/destructive annotations by disclosing deployment-dependent behavior: local installs write to disk and return a path, hosted servers return inline up to 10 MiB or a short-lived signed link above that, and all traffic routes through the portal rather than direct storage. These are exactly the operational facts an agent needs before calling.

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 compact sentences: identity/lookup, then result shape, then a transport caveat. No filler and the key constraint (portal-routed) is deliberately placed last as the exception note.

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 three-parameter read tool with no output schema, the description adequately explains what comes back in both deployment modes and the size threshold. Minor gap: it does not say what happens on failure (e.g., index out of range) or whether the signed link expires in a stated interval.

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 already documents index, master_id, and output_dir with their provenance and defaults, so the description's restatement of master id and index adds little. It does add one useful nuance by noting output_dir is ignored on a hosted server, but that is already stated in the schema.

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?

States a specific verb and resource ('Download one file attached to a secure message') and immediately scopes it by master_id plus index, tying it to the sibling tool insync_list_attachments. An agent can distinguish it from insync_download_document purely from the description.

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?

Makes the prerequisite explicit: the index comes from insync_list_attachments, so the agent knows to enumerate first. It does not explicitly exclude the document-download sibling, so the when-not is only implied by the 'attachment to a secure message' scoping.

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