# complete_attachment_upload

> 업로드된 파일을 선언한 내용과 대조해 확인하고 첨부 파일을 보낼 수 있는 상태로 만드는 AirBuild MCP 도구입니다.

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

`complete_attachment_upload`는 [create_attachment_upload](https://air.build/ko/docs/mcp-tools/create_attachment_upload/)로 시작한 업로드를 완료합니다. `PUT`으로 바이트를 보낸 뒤, 업로드된 파일이 선언한 크기와 미디어 유형인지 확인하고 첨부 파일을 `ready`로 표시합니다. 그래야 [send_message](https://air.build/ko/docs/mcp-tools/send_message/)가 첨부할 수 있습니다. 아무것도 업로드하지 않으며, 메시지를 보내지도 않습니다. 이미 준비된 첨부 파일로 다시 호출하면 첨부 파일을 현재 상태 그대로 응답합니다.

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

## 입력

| 입력 | 유형 | 필수 | 기본값 | 설명 |
| --- | --- | --- | --- | --- |
| `attachmentId` | 문자열 (UUID) | 예 | — | [create_attachment_upload](https://air.build/ko/docs/mcp-tools/create_attachment_upload/)에서 받은 `attachmentId` |

## 결과

| 필드 | 내용 |
| --- | --- |
| `attachment.id` | 첨부 파일의 id |
| `attachment.fileName` | 파일 이름 |
| `attachment.mediaType` | 미디어 유형, 소문자 |
| `attachment.byteCount` | 바이트 크기 |
| `attachment.status` | `ready` |
| `attachment.altText` | 이미지를 볼 수 없는 사람을 위한 이미지 설명 또는 `null`(이 도구는 설정하지 않음) |

```json
{
  "attachment": {
    "id": "00000000-0000-0000-0000-000000000000",
    "fileName": "report.pdf",
    "mediaType": "application/pdf",
    "byteCount": 482113,
    "status": "ready",
    "altText": null
  }
}
```

## 오류

| Message | 발생 조건 | 해결 방법 |
| --- | --- | --- |
| The completed object does not match the Attachment upload declaration. | 업로드된 파일의 크기나 `Content-Type`이 선언한 것과 다르거나, 바이트가 다른 업로드로 감 | 첨부 파일은 폐기됩니다. [create_attachment_upload](https://air.build/ko/docs/mcp-tools/create_attachment_upload/)로 다시 시작하고, 정확한 `byteCount`를 지정한 `contentType`으로 보내세요 |
| The Attachment upload state cannot be completed. | 업로드를 더 이상 완료할 수 없음 | [create_attachment_upload](https://air.build/ko/docs/mcp-tools/create_attachment_upload/)로 다시 시작하세요 |
| The Attachment upload state changed before it became ready. | 이 호출이 확인하는 동안 다른 호출이 업로드를 변경함 | 다시 호출하세요. 또 실패하면 새 업로드를 시작하세요 |
| Attachment not found. | 이 id의 첨부 파일이 없거나 폐기됨 | [create_attachment_upload](https://air.build/ko/docs/mcp-tools/create_attachment_upload/)에서 받은 `attachmentId`를 사용하세요 |
| Team not found. | 첨부 파일이 내가 속하지 않은 팀의 것임 | 내가 속한 팀의 첨부 파일을 사용하세요 |
| File uploads aren't available right now. Try again later. | 현재 업로드를 사용할 수 없음 | 나중에 다시 시도하세요 |

바이트가 업로드된 적이 없으면 AirBuild가 찾지 못해 저장소 오류로 호출이 실패합니다. 먼저 `PUT`을 하세요. 모든 도구가 반환할 수 있는 오류는 [서버와 로그인](https://air.build/ko/docs/mcp-tools/server/#errors)에 있습니다.

## 예시

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