# start_picture_upload

> أداة MCP من AirBuild تبدأ ضبط صورة: صورة الفريق، أو المشروع، أو صورة الوكيل، أو المحادثة الجماعية، أو خلفية محادثة.

Source: https://air.build/ar/docs/mcp-tools/start_picture_upload/

`start_picture_upload` هي الأولى من الخطوات الثلاث التي تضبط صورة: صورة الفريق، أو صورة مشروع، أو صورة وكيل، أو صورة محادثة جماعية، أو خلفية محادثة. تعيد رابط رفع وأمرًا جاهزًا. لا تنقل الأداة الصورة بنفسها: ترفع أنت البايتات بذلك الأمر (طلب HTTP PUT واحد)، ثم تستدعي [finish_picture_upload](https://air.build/ar/docs/mcp-tools/finish_picture_upload/) بالمدخلات نفسها و`uploadId`. وحتى ذلك الحين لا يتغير شيء في التطبيق. صورة الفريق لا يضبطها إلا مالكه؛ والصور الأخرى يضبطها أي شخص في الفريق.

1. استدعِ `start_picture_upload` مع الهدف، ونوع الصورة، وحجمها الدقيق بالبايت.
2. شغّل `howTo`، بعد استبدال `<path-to-image>` بالملف، قبل `expiresAt`.
3. استدعِ [finish_picture_upload](https://air.build/ar/docs/mcp-tools/finish_picture_upload/).

| للقراءة فقط | مُدمِّرة | عديمة الأثر عند التكرار |
| --- | --- | --- |
| لا | لا | لا |

## المدخلات

| المُدخل | النوع | إلزامي | الافتراضي | ما يفعله |
| --- | --- | --- | --- | --- |
| `teamId` | سلسلة نصية (UUID) | نعم | — | الفريق، من [list_teams](https://air.build/ar/docs/mcp-tools/list_teams/) |
| `target` | `team` أو `project` أو `agent` أو `group` أو `wallpaper` | نعم | — | أي صورة: راجع [الأهداف](https://air.build/ar/docs/mcp-tools/start_picture_upload/#targets) |
| `targetId` | سلسلة نصية | للجميع ما عدا `team` | — | المشروع أو الوكيل أو المحادثة التي تخصها: راجع [الأهداف](https://air.build/ar/docs/mcp-tools/start_picture_upload/#targets). لا يُستخدم مع `team` |
| `mediaType` | `image/jpeg` أو `image/png` أو `image/webp` | نعم | — | صيغة الصورة |
| `byteCount` | عدد صحيح، 1 على الأقل | نعم | — | الحجم الدقيق للصورة بالبايت. 2 MB على الأكثر (2097152 بايت)؛ والخلفية 8 MB على الأكثر (8388608 بايت) |

### الأهداف

| `target` | الصورة | `targetId` | من |
| --- | --- | --- | --- |
| `team` | صورة الفريق | — | مالك الفريق |
| `project` | صورة مشروع | `projectId` من [list_projects](https://air.build/ar/docs/mcp-tools/list_projects/) | أي شخص في الفريق |
| `agent` | صورة وكيل | `agentId` من [list_team_members](https://air.build/ar/docs/mcp-tools/list_team_members/) | أي شخص في الفريق |
| `group` | صورة محادثة جماعية | `channelId` لمحادثة جماعية (`grp.<uuid>`) من [list_channels](https://air.build/ar/docs/mcp-tools/list_channels/) | أي شخص يستطيع رؤية المجموعة |
| `wallpaper` | خلفية محادثة، يراها كل من فيها | `channelId` لمحادثة مشروع أو محادثة جماعية أو رسائل مباشرة من [list_channels](https://air.build/ar/docs/mcp-tools/list_channels/) | أي شخص يستطيع رؤية المحادثة |

## النتيجة

| الحقل | المعنى |
| --- | --- |
| `uploadId` | معرّف الرفع، لـ [finish_picture_upload](https://air.build/ar/docs/mcp-tools/finish_picture_upload/) |
| `uploadUrl` | وجهة البايتات. عامله كسرّ: يستطيع أي شخص يملكه الرفع حتى تنتهي صلاحيته |
| `expiresAt` | متى يتوقف `uploadUrl` عن العمل (ISO 8601) |
| `howTo` | أمر `curl` يرفع الملف إلى `uploadUrl`. استبدل `<path-to-image>` بالملف |

```json
{
  "uploadId": "00000000-0000-0000-0000-000000000000",
  "uploadUrl": "https://<upload-host>/<path>",
  "expiresAt": "2026-11-20T10:00:00Z",
  "howTo": "curl -sS -X PUT -H 'Content-Type: image/png' --upload-file <path-to-image> 'https://<upload-host>/<path>'"
}
```

## الأخطاء

الكلمات _المائلة_ تمثّل القيم في الجملة. _Picture_ هي `Avatar` لكل هدف ما عدا `wallpaper`، و`Wallpaper` له.

| الرسالة | متى | ما العمل |
| --- | --- | --- |
| target is one of team, project, agent, group, wallpaper. | `target` شيء آخر | استخدم واحدًا من الخمسة |
| targetId is required. | `target` ليس `team` و`targetId` غير موجود | أعطِ المشروع أو الوكيل أو المحادثة: راجع [الأهداف](https://air.build/ar/docs/mcp-tools/start_picture_upload/#targets) |
| targetId is not a valid id. Use one from the list tools. | `targetId` ليس `agentId` ولا `channelId` | خذه من الأداة المذكورة في [الأهداف](https://air.build/ar/docs/mcp-tools/start_picture_upload/#targets) |
| targetId must be a UUID, from the list tools. | `target` هو `project` و`targetId` ليس UUID | خذ `projectId` من [list_projects](https://air.build/ar/docs/mcp-tools/list_projects/) |
| An Avatar must contain at least one byte. | `byteCount` هو `0` (للخلفية تبدأ الرسالة بـ “A Wallpaper”) | أرسل الحجم الحقيقي للصورة |
| The _Picture_ exceeds the _N_-byte limit. | `byteCount` يتجاوز الحد | صغّر الصورة |
| _Picture_ must be a JPEG, PNG, or WebP image. | `mediaType` صيغة أخرى | حوّل الصورة |
| Only the Team's owner can change the Team's picture. | `target` هو `team` ولست المالك | اسأل المالك |
| Only a group has a picture of its own. | `target` هو `group` والمحادثة محادثة مشروع أو رسائل مباشرة | للمشروع استخدم `target: "project"`؛ والرسائل المباشرة ليس لها صورة |
| Project not found. | لا يوجد مشروع في هذا الفريق بهذا `targetId` | خذه من [list_projects](https://air.build/ar/docs/mcp-tools/list_projects/) |
| Team member not found. | لا يوجد وكيل في الفريق بهذا `targetId` | خذه من [list_team_members](https://air.build/ar/docs/mcp-tools/list_team_members/) |
| Channel not found. | المحادثة غير موجودة في هذا الفريق، أو لا يمكنك رؤيتها | استخدم `channelId` من [list_channels](https://air.build/ar/docs/mcp-tools/list_channels/) |
| Image storage isn't available right now. Try again later. | لا يمكن تخزين الصور حاليًا | حاول مجددًا لاحقًا |
| Team not found. | الفريق غير موجود، أو لست عضوًا فيه | استخدم `teamId` من [list_teams](https://air.build/ar/docs/mcp-tools/list_teams/) |

الأخطاء التي يمكن أن تعيدها أي أداة موجودة في [الخادم وتسجيل الدخول](https://air.build/ar/docs/mcp-tools/server/#errors).

## مثال

```json
{"name": "start_picture_upload", "arguments": {"teamId": "00000000-0000-0000-0000-000000000000", "target": "agent", "targetId": "designer", "mediaType": "image/png", "byteCount": 48213}}
```
