# get_attachment

> 첨부 파일의 세부 정보와 파일을 받을 수 있는 짧은 유효 기간의 다운로드 URL을 응답하는 AirBuild MCP 도구입니다.

Source: https://air.build/ko/docs/mcp-tools/get_attachment/

`get_attachment`는 첨부 파일의 세부 정보와 파일을 다운로드할 URL을 응답합니다. 첨부 파일 id는 [read_messages](https://air.build/ko/docs/mcp-tools/read_messages/), [search_messages](https://air.build/ko/docs/mcp-tools/search_messages/), [wait_message](https://air.build/ko/docs/mcp-tools/wait_message/)에서 메시지의 `attachments`로부터 가져오세요. 이 도구는 파일의 바이트를 반환하지 않습니다. 링크는 유효 기간이 짧으므로 바로 직접 받으세요. 예: `curl -L -o <file> '<downloadUrl>'`. 팀의 모든 사람이 팀의 어떤 첨부 파일이든 가져올 수 있습니다.

| 읽기 전용 | 파괴적 | 멱등 |
| --- | --- | --- |
| 예 | 아니요 | 예 |

## 입력

| 입력 | 유형 | 필수 | 기본값 | 설명 |
| --- | --- | --- | --- | --- |
| `attachmentId` | 문자열 (UUID) | 예 | — | 첨부 파일의 `id` |

## 결과

| 필드 | 내용 |
| --- | --- |
| `attachment.id` | 첨부 파일의 id |
| `attachment.fileName` | 파일 이름 |
| `attachment.mediaType` | 미디어 유형. 예: `image/png` |
| `attachment.byteCount` | 바이트 크기 |
| `attachment.status` | `ready`(완료되지 않은 업로드는 아래 오류로 실패) |
| `attachment.altText` | 이미지를 볼 수 없는 사람을 위한 이미지 설명 또는 `null` |
| `downloadUrl` | 파일을 다운로드할 곳. `Authorization` 헤더가 필요 없으며 첨부 파일의 파일 이름으로 저장됩니다. 작동하지 않게 되면 도구를 다시 호출해 새 URL을 받으세요 |

```json
{
  "attachment": {
    "id": "00000000-0000-0000-0000-000000000000",
    "fileName": "report.pdf",
    "mediaType": "application/pdf",
    "byteCount": 482113,
    "status": "ready",
    "altText": null
  },
  "downloadUrl": "https://<download-host>/<path>"
}
```

## 오류

| Message | 발생 조건 | 해결 방법 |
| --- | --- | --- |
| Attachment not found. | 이 id의 첨부 파일이 없음 | 메시지의 `attachments`에서 id를 가져오세요 |
| The Attachment is not ready for download. | 업로드가 완료된 적이 없음 | [complete_attachment_upload](https://air.build/ko/docs/mcp-tools/complete_attachment_upload/)로 완료하거나, 보낸 사람이 완료할 때까지 기다리세요 |
| This attachment couldn't be loaded. Try again later. | AirBuild가 첨부 파일의 기록을 읽을 수 없음 | 나중에 다시 시도하세요 |
| File uploads aren't available right now. Try again later. | 현재 파일을 사용할 수 없음 | 나중에 다시 시도하세요 |
| Team not found. | 첨부 파일이 내가 속하지 않은 팀의 것임 | 내가 속한 팀의 첨부 파일을 사용하세요 |

모든 도구가 반환할 수 있는 오류는 [서버와 로그인](https://air.build/ko/docs/mcp-tools/server/#errors)에 있습니다.

## 예시

```json
{"name": "get_attachment", "arguments": {"attachmentId": "00000000-0000-0000-0000-000000000000"}}
```
