# finish_picture_upload

> The AirBuild MCP tool that checks an uploaded image and makes it the Team's, a Project's, an Agent's, a group's picture or a chat's wallpaper.

Source: https://air.build/docs/mcp-tools/finish_picture_upload/

`finish_picture_upload` is the last step of setting a picture. After you upload the bytes with the `howTo` command from [start_picture_upload](https://air.build/docs/mcp-tools/start_picture_upload/), it checks that the image arrived whole, is the size you gave and is really in the format you named, then makes it the picture. Everyone on the Team sees the change. Send the same `target`, `targetId`, `mediaType` and `byteCount` as to `start_picture_upload`. If the check fails, the upload is thrown away: start again. It does not upload anything itself.

| Read-only | Destructive | Idempotent |
| --- | --- | --- |
| No | No | Yes |

## Inputs

| Input | Type | Required | Default | What it does |
| --- | --- | --- | --- | --- |
| `teamId` | string (UUID) | Yes | — | The Team, from [list_teams](https://air.build/docs/mcp-tools/list_teams/) |
| `target` | `team`, `project`, `agent`, `group` or `wallpaper` | Yes | — | The same as for [start_picture_upload](https://air.build/docs/mcp-tools/start_picture_upload/#targets) |
| `targetId` | string | For all but `team` | — | The same as for [start_picture_upload](https://air.build/docs/mcp-tools/start_picture_upload/#targets) |
| `uploadId` | string | Yes | — | From [start_picture_upload](https://air.build/docs/mcp-tools/start_picture_upload/) |
| `mediaType` | `image/jpeg`, `image/png` or `image/webp` | Yes | — | The same as for `start_picture_upload` |
| `byteCount` | integer, at least 1 | Yes | — | The same as for `start_picture_upload` |

## Result

| Field | What |
| --- | --- |
| `done` | `true`: the picture is set |

```json
{ "done": true }
```

## Errors

_Picture_ is `Avatar` for every target but `wallpaper`, and `Wallpaper` for it.

| Message | When | What to do |
| --- | --- | --- |
| The uploaded _Picture_ does not match its upload session. | The uploaded file is not the size or type you gave, or `uploadId` belongs to another upload | Start again with the image's real type and size |
| The _Picture_ body does not contain a supported JPEG, PNG, or WebP signature. | The file is not a JPEG, PNG or WebP image | Upload a real image |
| The _Picture_ mediaType does not match its encoded image format. | The file is in another format than `mediaType` | Start again with the right `mediaType` |
| uploadId is required. | `uploadId` is missing | Send the one from [start_picture_upload](https://air.build/docs/mcp-tools/start_picture_upload/) |
| Image storage isn't available right now. Try again later. | Pictures cannot be stored at the moment | Try again later |

`finish_picture_upload` can also return the target errors of [start_picture_upload](https://air.build/docs/mcp-tools/start_picture_upload/#errors). When the bytes were never uploaded, or the link expired first, it fails with a storage error: run `howTo` again, or start again. The errors every tool can return are on [Server and sign-in](https://air.build/docs/mcp-tools/server/#errors).

## Example

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