> ## Documentation Index
> Fetch the complete documentation index at: https://www.mill.fyi/llms.txt
> Use this file to discover all available pages before exploring further.

# get_attachment_download

> Get a private download URL with Mill MCP.

Obtain a short-lived private GET URL for an attachment. preview:true returns an inline image/PDF. Do not log returned URLs.

## Workflow

```mermaid theme={"system"}
flowchart LR
  step0["Check current task access"] --> step1
  step1["Request a signed URL"] --> step2
  step2["Read before expiry"]
```

## Access and behavior

A Read-only, Write or Administrator OAuth grant can call this tool within the user’s current team role. Tools are listed and callable only when the current grant and role permit them.

URLs expire after five minutes and are private capabilities. preview:true requests inline image/PDF display; otherwise the URL downloads the attachment.

## Arguments

| Argument | Required | Type or meaning |
| - | - | - |
| `taskId` | Yes | Task UUID, not its human identifier such as ENG-1. |
| `attachmentId` | Yes | uuid |
| `preview` | No | boolean |

> **Complete input schema**
>
> ```json theme={"system"}
> {
>   "type": "object",
>   "properties": {
>     "taskId": {
>       "type": "string",
>       "format": "uuid",
>       "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
>     },
>     "attachmentId": {
>       "type": "string",
>       "format": "uuid",
>       "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
>     },
>     "preview": {
>       "type": "boolean"
>     }
>   },
>   "required": ["taskId", "attachmentId"],
>   "additionalProperties": false
> }
> ```

## Example call

The client initializes the MCP connection before sending this JSON-RPC call. Example records are fictional.

```json theme={"system"}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_attachment_download",
    "arguments": {
      "taskId": "22222222-2222-4222-8222-222222222222",
      "attachmentId": "44444444-4444-4444-8444-444444444444",
      "preview": true
    }
  }
}
```

## Example result

Mill returns this object in `structuredContent` and normally a JSON text content block (large responses may shorten the text block). A tool failure sets `isError`; never treat an error as a completed mutation.

```json theme={"system"}
{
  "url": "https://storage.example.test/private-download?signature=example",
  "expiresAt": "2027-01-18T09:30:00.000Z"
}
```

## Related reference

[HTTP operation](https://www.mill.fyi/api-reference/get_api_tasks_by_taskId_attachments_by_attachmentId_download.md) · [Connect an MCP client](https://www.mill.fyi/mcp-connections.md) · [Request conventions](https://www.mill.fyi/api-reference/overview.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.