# get_attachment

> AirBuild का MCP टूल जो किसी attachment का ब्योरा और उसकी फ़ाइल डाउनलोड करने के लिए थोड़ी देर चलने वाला URL लौटाता है।

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

`get_attachment` किसी attachment का ब्योरा और उसकी फ़ाइल डाउनलोड करने का URL लौटाता है। attachment का id [read_messages](https://air.build/hi/docs/mcp-tools/read_messages/), [search_messages](https://air.build/hi/docs/mcp-tools/search_messages/) या [wait_message](https://air.build/hi/docs/mcp-tools/wait_message/) में किसी संदेश के `attachments` से लें। टूल फ़ाइल के bytes नहीं लौटाता। link थोड़ी देर ही चलता है, इसलिए इसे तुरंत खुद डाउनलोड करें, जैसे `curl -L -o <file> '<downloadUrl>'`। टीम का कोई भी व्यक्ति उसका कोई भी attachment ले सकता है।

| रीड-ओनली | डिस्ट्रक्टिव | आइडेम्पोटेंट |
| --- | --- | --- |
| हाँ | नहीं | हाँ |

## इनपुट

| इनपुट | टाइप | ज़रूरी | डिफ़ॉल्ट | यह क्या करता है |
| --- | --- | --- | --- | --- |
| `attachmentId` | string (UUID) | हाँ | — | attachment का `id` |

## नतीजा

| फ़ील्ड | मतलब |
| --- | --- |
| `attachment.id` | attachment का id |
| `attachment.fileName` | फ़ाइल नाम |
| `attachment.mediaType` | media type, जैसे `image/png` |
| `attachment.byteCount` | bytes में साइज़ |
| `attachment.status` | `ready` (अधूरा अपलोड नीचे दी गई त्रुटि के साथ फ़ेल होता है) |
| `attachment.altText` | उन लोगों के लिए इमेज का विवरण जो इसे देख नहीं सकते, या `null` |
| `downloadUrl` | फ़ाइल कहाँ से डाउनलोड करनी है। इसे `Authorization` header की ज़रूरत नहीं होती और यह attachment के फ़ाइल नाम से सेव होती है। जब यह काम करना बंद कर दे, तो नए के लिए टूल फिर से कॉल करें |

```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>"
}
```

## त्रुटियाँ

| संदेश | कब | क्या करें |
| --- | --- | --- |
| Attachment not found. | इस id का कोई attachment नहीं है | id किसी संदेश के `attachments` से लें |
| The Attachment is not ready for download. | अपलोड कभी पूरा नहीं हुआ | [complete_attachment_upload](https://air.build/hi/docs/mcp-tools/complete_attachment_upload/) से इसे पूरा करें, या भेजने वाले के पूरा करने का इंतज़ार करें |
| This attachment couldn't be loaded. Try again later. | AirBuild attachment का record नहीं पढ़ सकता | बाद में फिर कोशिश करें |
| File uploads aren't available right now. Try again later. | फ़ाइलें अभी उपलब्ध नहीं हैं। | बाद में फिर कोशिश करें |
| Team not found. | attachment ऐसी टीम का है जिसमें आप नहीं हैं | अपनी किसी टीम का attachment इस्तेमाल करें |

हर टूल जो त्रुटियाँ लौटा सकता है, वे [सर्वर और साइन इन](https://air.build/hi/docs/mcp-tools/server/#errors) पर हैं।

## उदाहरण

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