> For the complete documentation index, see [llms.txt](https://docs.kinesis.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kinesis.network/mcp/tools/apps.md).

# Apps and templates

Discover, create and update container applications and ready-made templates.

Discover, create and update container applications and ready-made templates.

These are action names. In default compact mode, call the indicated group tool with `{"action":"<action-name>","params":{...}}`; the arguments below go inside `params`. In `?mode=all`, call the action name directly with those arguments. `browse_github` and `read_docs` are direct tools in both modes. Expand each schema for nested fields, enum values and validation constraints. Successful results are JSON in both text content and `structuredContent`; failures use `isError` and `structuredContent.error`.

Serverless capacity is CPU-only. GPU configurations require `config.grids.ids`; GPU templates carry this requirement in `notes`. Configure credentials in the portal when using the OpenAI profile. Null environment values preserve existing variables on update, including values hidden by that profile.

The [OpenAI profile](/mcp/openai-profile.md) calls individual actions, omits `get_byod_token`, and restricts credential inputs and environment outputs. The input schemas below describe the standard catalog; profile-specific schemas are included where they differ.

## `list_apps`

List the apps the caller can see, oldest first. Across every project, or within one

**Group:** `apps` · **Behavior:** Read

**Compact tool:** `apps` · **Action:** `list_apps`

**MCP annotations:** `readOnlyHint: true` · `destructiveHint: false` · `idempotentHint: true` · `openWorldHint: false`

### Permissions and REST equivalents

| Operation   | REST        | Required scopes |
| ----------- | ----------- | --------------- |
| `apps.list` | `GET /apps` | `apps:read`     |

### Arguments

| Argument    | Type      | Required | Description                                                                          |
| ----------- | --------- | -------- | ------------------------------------------------------------------------------------ |
| `projectId` | `string`  | No       | Limit the list to one project                                                        |
| `limit`     | `integer` | No       | Items per page, 1 to 200 (default 50)                                                |
| `cursor`    | `string`  | No       | nextCursor from the previous page; omit for the first page                           |
| `org`       | `string`  | No       | Slug of an organization (see orgs.list) to list only what is in it or shared into it |

<details>

<summary>Complete input schema</summary>

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "projectId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{24}$",
      "description": "Limit the list to one project"
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 200,
      "description": "Items per page, 1 to 200 (default 50)"
    },
    "cursor": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512,
      "description": "nextCursor from the previous page; omit for the first page"
    },
    "org": {
      "description": "Slug of an organization (see orgs.list) to list only what is in it or shared into it",
      "type": "string",
      "minLength": 3,
      "maxLength": 39
    }
  },
  "additionalProperties": false
}
```

</details>

### Result

* `apps` (`array<object>`): See the complete response schema below.
* `nextCursor` (`string or null`): Pass as cursor to fetch the next page; null on the last page

<details>

<summary>Response schema: apps.list</summary>

```json
{
  "type": "object",
  "properties": {
    "apps": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "App id"
          },
          "projectId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "guid": {
            "type": "string",
            "description": "Runtime identifier of the app"
          },
          "source": {
            "description": "Where the image comes from: Docker Hub, a registry link, GitHub or an upload",
            "type": [
              "string",
              "null"
            ]
          },
          "image": {
            "type": [
              "string",
              "null"
            ]
          },
          "domain": {
            "description": "Hostname the app answers on: the default custom domain, else the Kinesis-issued one",
            "type": [
              "string",
              "null"
            ]
          },
          "buildState": {
            "description": "Build pipeline state for GitHub-sourced apps",
            "type": [
              "string",
              "null"
            ]
          },
          "access": {
            "type": "object",
            "properties": {
              "role": {
                "type": "string",
                "enum": [
                  "admin",
                  "developer",
                  "viewer"
                ],
                "description": "The caller's role on it"
              },
              "outside": {
                "type": "boolean",
                "description": "Shared with the caller from another organization"
              },
              "isCreator": {
                "type": "boolean",
                "description": "The caller created it"
              }
            },
            "required": [
              "role",
              "outside",
              "isCreator"
            ],
            "additionalProperties": false
          },
          "createdBy": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "userId": {
                    "type": "string",
                    "description": "User id, as members.list and the sharing calls use it"
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "email": {
                    "type": "string"
                  }
                },
                "required": [
                  "userId",
                  "name",
                  "email"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "Who created it. Null when nobody is on record, for another organization's, and for a credential without members:read"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp (UTC)"
          }
        },
        "required": [
          "id",
          "projectId",
          "name",
          "guid",
          "source",
          "image",
          "domain",
          "buildState",
          "access",
          "createdBy",
          "createdAt"
        ],
        "additionalProperties": false
      }
    },
    "nextCursor": {
      "description": "Pass as cursor to fetch the next page; null on the last page",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "apps",
    "nextCursor"
  ],
  "additionalProperties": false
}
```

</details>

## `list_templates`

The gallery's app templates as ready-made create\_app configurations. Ollama chat with a chosen model, vLLM servers, ...: pass a template's config to create\_app with a name, edited as needed; notes says what a template needs filled in first.

**Group:** `apps` · **Behavior:** Read

**Compact tool:** `apps` · **Action:** `list_templates`

**MCP annotations:** `readOnlyHint: true` · `destructiveHint: false` · `idempotentHint: true` · `openWorldHint: false`

### Permissions and REST equivalents

| Operation        | REST             | Required scopes                                                             |
| ---------------- | ---------------- | --------------------------------------------------------------------------- |
| `templates.list` | `GET /templates` | Authenticated connection; organization and resource permissions still apply |

### Arguments

| Argument   | Type                                            | Required | Description                                     |
| ---------- | ----------------------------------------------- | -------- | ----------------------------------------------- |
| `search`   | `string`                                        | No       | Case-insensitive substring of the name or image |
| `category` | `"llm_general" / "llm_performance" / "general"` | No       | Only templates of this category                 |

<details>

<summary>Complete input schema</summary>

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "search": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "Case-insensitive substring of the name or image"
    },
    "category": {
      "type": "string",
      "enum": [
        "llm_general",
        "llm_performance",
        "general"
      ],
      "description": "Only templates of this category"
    }
  },
  "additionalProperties": false
}
```

</details>

### Result

* `templates` (`array<object>`): See the complete response schema below.
* `galleryUrl` (`string`): The dashboard gallery, where the same templates are deployed by hand

<details>

<summary>Response schema: templates.list</summary>

```json
{
  "type": "object",
  "properties": {
    "templates": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Template id"
          },
          "name": {
            "type": "string",
            "description": "Suggested app name"
          },
          "category": {
            "type": "string",
            "enum": [
              "llm_general",
              "llm_performance",
              "general"
            ]
          },
          "image": {
            "description": "Container image the template deploys",
            "type": [
              "string",
              "null"
            ]
          },
          "paidTierOnly": {
            "type": "boolean",
            "description": "Meant for organizations with a payment on record"
          },
          "notes": {
            "description": "What to fill in before deploying, when the template is not complete as is",
            "type": [
              "string",
              "null"
            ]
          },
          "config": {
            "type": "object",
            "properties": {
              "image": {
                "description": "Container image reference, e.g. nginx:1.27 or ghcr.io/org/app:tag",
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              },
              "registryAuth": {
                "description": "Credentials for a private image",
                "type": "object",
                "properties": {
                  "username": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Registry login"
                  },
                  "password": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Registry password or token (write-only)"
                  }
                },
                "required": [
                  "username",
                  "password"
                ],
                "additionalProperties": false
              },
              "ports": {
                "description": "Ports to expose",
                "maxItems": 32,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "port": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 65535,
                      "description": "Container port"
                    },
                    "protocol": {
                      "type": "string",
                      "enum": [
                        "tcp",
                        "udp",
                        "tcp_load_balancer",
                        "tcps_load_balancer",
                        "http_load_balancer",
                        "https_load_balancer",
                        "http80_load_balancer",
                        "https443_load_balancer",
                        "grpcs_load_balancer"
                      ],
                      "description": "How the port is exposed"
                    }
                  },
                  "required": [
                    "port",
                    "protocol"
                  ],
                  "additionalProperties": false
                }
              },
              "env": {
                "description": "Environment variables",
                "maxItems": 200,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string",
                      "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
                      "description": "Variable name"
                    },
                    "value": {
                      "description": "Value; null keeps the stored value of an existing variable",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "secret": {
                      "description": "Store as a secret: never returned by reads",
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "key",
                    "value"
                  ],
                  "additionalProperties": false
                }
              },
              "command": {
                "description": "Container command (CMD) override",
                "maxItems": 256,
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "entrypoint": {
                "description": "Container entrypoint override",
                "maxItems": 256,
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "startupCommand": {
                "description": "Command run inside the container once it starts; null clears it",
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "args": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Command and arguments"
                      },
                      "user": {
                        "description": "User to run as",
                        "type": "string"
                      },
                      "timeoutSec": {
                        "description": "Seconds before the command is considered failed",
                        "type": "integer",
                        "minimum": 0
                      },
                      "startPeriodSec": {
                        "description": "Seconds to wait after the container starts",
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "args"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "healthcheck": {
                "description": "Container health check; null clears it",
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "test": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Command that must exit 0 for the app to count as healthy"
                      },
                      "intervalSec": {
                        "type": "integer",
                        "minimum": 1,
                        "description": "Seconds between checks"
                      }
                    },
                    "required": [
                      "test",
                      "intervalSec"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "restartPolicy": {
                "description": "Restart behaviour",
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "disabled",
                      "always",
                      "on_failure",
                      "task_completion"
                    ],
                    "description": "When to restart a container that exits"
                  },
                  "startTimeoutSec": {
                    "description": "Seconds a start may take before it counts as failed",
                    "type": "integer",
                    "minimum": 0
                  },
                  "maxRetriesPerNode": {
                    "description": "Restarts allowed on one server before moving on",
                    "type": "integer",
                    "minimum": 0
                  },
                  "maxErrorTolerance": {
                    "description": "Failures tolerated before the app is stopped",
                    "type": "integer",
                    "minimum": 0
                  },
                  "numTasks": {
                    "description": "For task_completion: runs to complete before stopping",
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "mode"
                ],
                "additionalProperties": false
              },
              "instances": {
                "description": "Instance count range",
                "type": "object",
                "properties": {
                  "min": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Instances to keep running"
                  },
                  "max": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Upper bound for scaling"
                  }
                },
                "required": [
                  "min",
                  "max"
                ],
                "additionalProperties": false
              },
              "stateful": {
                "description": "Keep each instance pinned to its server and disk",
                "type": "boolean"
              },
              "hardware": {
                "description": "Hardware requirements per instance",
                "type": "object",
                "properties": {
                  "gpuCount": {
                    "description": "GPUs per instance; 0 for CPU-only. Above 0 needs grids.ids: serverless placement is CPU-only",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 16
                  },
                  "gpuModels": {
                    "description": "Acceptable GPU models, e.g. H100; empty means any",
                    "maxItems": 16,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "gpuManufacturer": {
                    "description": "GPU vendor; null means any",
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "amd",
                          "apple",
                          "intel",
                          "nvidia",
                          "xilinx"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "gpuVramBytes": {
                    "description": "Minimum VRAM per GPU, in bytes",
                    "type": "integer",
                    "minimum": 0
                  },
                  "ramBytes": {
                    "description": "RAM per instance, in bytes",
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "storageBytes": {
                    "description": "Disk per instance, in bytes",
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "shmemBytes": {
                    "description": "Shared memory (/dev/shm) size, in bytes",
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "additionalProperties": false
              },
              "placement": {
                "description": "Where the app may run and who may reach it",
                "type": "object",
                "properties": {
                  "regions": {
                    "description": "Kinesis regions to run in; empty means any",
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "us-west",
                        "us-east",
                        "us-central",
                        "ca-west",
                        "ca-east",
                        "ca-central",
                        "eu-west",
                        "eu-north",
                        "eu-east",
                        "eu-south",
                        "eu-central",
                        "eu-south-east",
                        "ap-east",
                        "ap-south-east",
                        "ap-north-east",
                        "ap-south"
                      ]
                    }
                  },
                  "providers": {
                    "description": "Restrict placement to specific providers and regions",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "csp": {
                          "type": "string",
                          "enum": [
                            "aws",
                            "azure",
                            "gcp",
                            "kinesis"
                          ],
                          "description": "Cloud provider"
                        },
                        "regions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "region": {
                                "type": "string",
                                "minLength": 1,
                                "description": "Provider region"
                              },
                              "zones": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "Zones within the region; empty means any"
                              }
                            },
                            "required": [
                              "region",
                              "zones"
                            ],
                            "additionalProperties": false
                          },
                          "description": "Regions of the provider to allow"
                        }
                      },
                      "required": [
                        "csp",
                        "regions"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "allowedIps": {
                    "description": "Source IPs or CIDR ranges allowed to reach the app; empty means everyone",
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": false
              },
              "grids": {
                "description": "Run on grids instead of serverless capacity (members only, on grids they may deploy to)",
                "type": "object",
                "properties": {
                  "ids": {
                    "description": "Grids to run on; empty means serverless (CPU-only), so a GPU app names at least one",
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "priorities": {
                    "description": "Priority per grid id, -100 to 100",
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "integer",
                      "minimum": -100,
                      "maximum": 100
                    }
                  }
                },
                "additionalProperties": false
              },
              "volumes": {
                "description": "Persistent volumes",
                "maxItems": 4,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{1,63}$",
                      "description": "Volume name, unique within the app"
                    },
                    "target": {
                      "type": "string",
                      "pattern": "^\\/.+",
                      "description": "Absolute mount path inside the container"
                    },
                    "declaredSizeBytes": {
                      "description": "Expected size, used for placement; 0 or omitted means unspecified",
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 17592186044416
                    }
                  },
                  "required": [
                    "name",
                    "target"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "additionalProperties": false,
            "description": "Pass as config to apps.create, edited as needed"
          }
        },
        "required": [
          "id",
          "name",
          "category",
          "image",
          "paidTierOnly",
          "notes",
          "config"
        ],
        "additionalProperties": false
      }
    },
    "galleryUrl": {
      "type": "string",
      "description": "The dashboard gallery, where the same templates are deployed by hand"
    }
  },
  "required": [
    "templates",
    "galleryUrl"
  ],
  "additionalProperties": false
}
```

</details>

## `get_app`

Get an app with its full configuration and last known status

**Group:** `apps` · **Behavior:** Read

**Compact tool:** `apps` · **Action:** `get_app`

**MCP annotations:** `readOnlyHint: true` · `destructiveHint: false` · `idempotentHint: true` · `openWorldHint: false`

### Permissions and REST equivalents

| Operation  | REST                                     | Required scopes |
| ---------- | ---------------------------------------- | --------------- |
| `apps.get` | `GET /projects/{projectId}/apps/{appId}` | `apps:read`     |

### Arguments

| Argument    | Type     | Required | Description |
| ----------- | -------- | -------- | ----------- |
| `projectId` | `string` | Yes      | Project id  |
| `appId`     | `string` | Yes      | App id      |

<details>

<summary>Complete input schema</summary>

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "projectId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{24}$",
      "description": "Project id"
    },
    "appId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{24}$",
      "description": "App id"
    }
  },
  "required": [
    "projectId",
    "appId"
  ],
  "additionalProperties": false
}
```

</details>

### Result

* `id` (`string`): App id
* `projectId` (`string`): See the complete response schema below.
* `name` (`string`): See the complete response schema below.
* `guid` (`string`): Runtime identifier of the app
* `source` (`string or null`): Where the image comes from: Docker Hub, a registry link, GitHub or an upload
* `image` (`string or null`): See the complete response schema below.
* `domain` (`string or null`): Hostname the app answers on: the default custom domain, else the Kinesis-issued one
* `buildState` (`string or null`): Build pipeline state for GitHub-sourced apps
* `access` (`object`): See the complete response schema below.
* `createdBy` (`object or null`): Who created it. Null when nobody is on record, for another organization's, and for a credential without members:read
* `createdAt` (`string`): ISO 8601 timestamp (UTC)
* `status` (`object`): Status as last cached; use the status endpoint for a live read
* `config` (`object or null`): See the complete response schema below.
* `github` (`object or null`): Repository settings of a GitHub-sourced app
* `defaultDomain` (`string or null`): Custom domain shown as the app's address in the dashboard; null for the Kinesis-issued one

<details>

<summary>Response schema: apps.get</summary>

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "App id"
    },
    "projectId": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "guid": {
      "type": "string",
      "description": "Runtime identifier of the app"
    },
    "source": {
      "description": "Where the image comes from: Docker Hub, a registry link, GitHub or an upload",
      "type": [
        "string",
        "null"
      ]
    },
    "image": {
      "type": [
        "string",
        "null"
      ]
    },
    "domain": {
      "description": "Hostname the app answers on: the default custom domain, else the Kinesis-issued one",
      "type": [
        "string",
        "null"
      ]
    },
    "buildState": {
      "description": "Build pipeline state for GitHub-sourced apps",
      "type": [
        "string",
        "null"
      ]
    },
    "access": {
      "type": "object",
      "properties": {
        "role": {
          "type": "string",
          "enum": [
            "admin",
            "developer",
            "viewer"
          ],
          "description": "The caller's role on it"
        },
        "outside": {
          "type": "boolean",
          "description": "Shared with the caller from another organization"
        },
        "isCreator": {
          "type": "boolean",
          "description": "The caller created it"
        }
      },
      "required": [
        "role",
        "outside",
        "isCreator"
      ],
      "additionalProperties": false
    },
    "createdBy": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "userId": {
              "type": "string",
              "description": "User id, as members.list and the sharing calls use it"
            },
            "name": {
              "type": [
                "string",
                "null"
              ]
            },
            "email": {
              "type": "string"
            }
          },
          "required": [
            "userId",
            "name",
            "email"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ],
      "description": "Who created it. Null when nobody is on record, for another organization's, and for a credential without members:read"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 timestamp (UTC)"
    },
    "status": {
      "type": "object",
      "properties": {
        "state": {
          "type": "string",
          "enum": [
            "unknown",
            "running",
            "stopped",
            "starting",
            "stopping",
            "scaling",
            "updating",
            "downloading",
            "provisioning",
            "start_blocked",
            "error",
            "building",
            "build_failed"
          ],
          "description": "Aggregate state; build states win while there is no runnable image"
        },
        "targetState": {
          "type": "string",
          "enum": [
            "running",
            "stopped",
            "unknown"
          ],
          "description": "What the runtime was last asked for; unknown until it has been asked, as for a repository app before its first build succeeds"
        },
        "nodes": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "address": {
                "type": "string"
              },
              "state": {
                "type": "string"
              },
              "reportedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "description": "ISO 8601 timestamp (UTC)"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "When the server last reported this state; not a start time"
              }
            },
            "required": [
              "address",
              "state",
              "reportedAt"
            ],
            "additionalProperties": false
          },
          "description": "Servers the app is placed on and the container state on each"
        },
        "endpoints": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "port": {
                "type": "integer",
                "description": "Container port, as in config.ports"
              },
              "protocol": {
                "type": "string",
                "description": "Protocol of that port, as in config.ports"
              },
              "address": {
                "description": "An http(s) URL for the HTTP protocols, host:port for the others; null until the endpoint is wired",
                "type": [
                  "string",
                  "null"
                ]
              },
              "server": {
                "description": "Server address of a direct tcp or udp endpoint; null when load-balanced",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "port",
              "protocol",
              "address",
              "server"
            ],
            "additionalProperties": false
          },
          "description": "Where each configured port answers; a load-balanced port gets its address a minute or two after the first start"
        },
        "errors": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "description": "ISO 8601 timestamp (UTC)"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "details": {
                "anyOf": [
                  {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Extra data the runtime attached, such as the grid or server involved"
              }
            },
            "required": [
              "type",
              "message",
              "at",
              "details"
            ],
            "additionalProperties": false
          },
          "description": "Recent runtime errors, newest first"
        },
        "workOrders": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "description": "What the runtime asked the server to do"
              },
              "server": {
                "type": "string",
                "description": "Server address"
              },
              "status": {
                "type": "string"
              },
              "createdAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "description": "ISO 8601 timestamp (UTC)"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "startedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "description": "ISO 8601 timestamp (UTC)"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "completedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "description": "ISO 8601 timestamp (UTC)"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "type",
              "server",
              "status",
              "createdAt",
              "startedAt",
              "completedAt"
            ],
            "additionalProperties": false
          },
          "description": "The runtime's latest instructions to servers, newest first; an order that never completes is the stall"
        },
        "grid": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "fill": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "target": {
                          "type": "integer",
                          "description": "Members the grid is composed to have"
                        },
                        "online": {
                          "type": "integer",
                          "description": "Members the app runs on"
                        },
                        "pending": {
                          "type": "integer"
                        },
                        "converging": {
                          "type": "boolean",
                          "description": "The grid is still acquiring members or placing the app"
                        }
                      },
                      "required": [
                        "target",
                        "online",
                        "pending",
                        "converging"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "How far the grid has filled for this app"
                },
                "idleReclaim": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "gridId": {
                        "type": "string"
                      },
                      "warnedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "description": "ISO 8601 timestamp (UTC)"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "evictAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "description": "ISO 8601 timestamp (UTC)"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "When the app becomes evictable; null when the grid only warns"
                      },
                      "evictedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "description": "ISO 8601 timestamp (UTC)"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "cooldownEndsAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "description": "ISO 8601 timestamp (UTC)"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "When the grid takes the app again after an eviction"
                      },
                      "evidence": {
                        "type": "string",
                        "description": "Why the grid considers the app idle"
                      }
                    },
                    "required": [
                      "gridId",
                      "warnedAt",
                      "evictAt",
                      "evictedAt",
                      "cooldownEndsAt",
                      "evidence"
                    ],
                    "additionalProperties": false
                  },
                  "description": "Grids whose idle policy has warned or evicted the app"
                },
                "queue": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "gridId": {
                        "type": "string"
                      },
                      "position": {
                        "type": "integer",
                        "description": "1-based place in the grid's fair-share queue"
                      },
                      "queueLength": {
                        "type": "integer"
                      },
                      "enqueuedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "description": "ISO 8601 timestamp (UTC)"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "held": {
                        "type": "boolean",
                        "description": "The scheduler keeps the app off the grid until its turn comes"
                      }
                    },
                    "required": [
                      "gridId",
                      "position",
                      "queueLength",
                      "enqueuedAt",
                      "held"
                    ],
                    "additionalProperties": false
                  },
                  "description": "Full grids the app is queued on"
                }
              },
              "required": [
                "fill",
                "idleReclaim",
                "queue"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ],
          "description": "Grid placement details; null for a serverless app"
        },
        "pollAfterSec": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Seconds to wait before reading the status again while it is changing; null in a settled state"
        }
      },
      "required": [
        "state",
        "targetState",
        "nodes",
        "endpoints",
        "errors",
        "workOrders",
        "grid",
        "pollAfterSec"
      ],
      "additionalProperties": false,
      "description": "Status as last cached; use the status endpoint for a live read"
    },
    "config": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "image": {
              "type": "string",
              "description": "Container image reference"
            },
            "imageTag": {
              "description": "Tag, kept separately for Docker Hub images",
              "type": [
                "string",
                "null"
              ]
            },
            "registryUsername": {
              "description": "Registry login; the password is write-only",
              "type": [
                "string",
                "null"
              ]
            },
            "ports": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "port": {
                    "type": "integer"
                  },
                  "protocol": {
                    "type": "string"
                  }
                },
                "required": [
                  "port",
                  "protocol"
                ],
                "additionalProperties": false
              }
            },
            "env": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string"
                  },
                  "value": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "secret": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "key",
                  "value",
                  "secret"
                ],
                "additionalProperties": false
              },
              "description": "Environment variables; value is null for secrets, and on a connection that takes no credentials for values that look like one (null keeps a value on update)"
            },
            "command": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "entrypoint": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "startupCommand": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "args": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "user": {
                      "type": "string"
                    },
                    "timeoutSec": {
                      "type": "number"
                    },
                    "startPeriodSec": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "args",
                    "user",
                    "timeoutSec",
                    "startPeriodSec"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "healthcheck": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "test": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "intervalSec": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "test",
                    "intervalSec"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "restartPolicy": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string"
                    },
                    "startTimeoutSec": {
                      "type": "number"
                    },
                    "maxRetriesPerNode": {
                      "type": "number"
                    },
                    "maxErrorTolerance": {
                      "type": "number"
                    },
                    "numTasks": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "mode",
                    "startTimeoutSec",
                    "maxRetriesPerNode",
                    "maxErrorTolerance",
                    "numTasks"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "instances": {
              "type": "object",
              "properties": {
                "min": {
                  "type": "integer"
                },
                "max": {
                  "type": "integer"
                }
              },
              "required": [
                "min",
                "max"
              ],
              "additionalProperties": false
            },
            "stateful": {
              "type": "boolean"
            },
            "hardware": {
              "type": "object",
              "properties": {
                "gpuCount": {
                  "type": "integer"
                },
                "gpuModels": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "gpuManufacturer": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "gpuVramBytes": {
                  "type": "number"
                },
                "ramBytes": {
                  "type": "number"
                },
                "storageBytes": {
                  "type": "number"
                },
                "shmemBytes": {
                  "type": "number"
                }
              },
              "required": [
                "gpuCount",
                "gpuModels",
                "gpuManufacturer",
                "gpuVramBytes",
                "ramBytes",
                "storageBytes",
                "shmemBytes"
              ],
              "additionalProperties": false
            },
            "placement": {
              "type": "object",
              "properties": {
                "regions": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Kinesis regions, e.g. us-west"
                },
                "providers": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "csp": {
                        "type": "string"
                      },
                      "regions": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "region": {
                              "type": "string"
                            },
                            "zones": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "region",
                            "zones"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "csp",
                      "regions"
                    ],
                    "additionalProperties": false
                  }
                },
                "allowedIps": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Source IPs or CIDR ranges allowed to reach the app"
                }
              },
              "required": [
                "regions",
                "providers",
                "allowedIps"
              ],
              "additionalProperties": false
            },
            "grids": {
              "type": "object",
              "properties": {
                "ids": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "priorities": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "number"
                  },
                  "description": "Priority per grid id"
                }
              },
              "required": [
                "ids",
                "priorities"
              ],
              "additionalProperties": false
            },
            "volumes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "target": {
                    "type": "string"
                  },
                  "declaredSizeBytes": {
                    "type": "number"
                  }
                },
                "required": [
                  "name",
                  "target",
                  "declaredSizeBytes"
                ],
                "additionalProperties": false
              }
            },
            "domains": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Custom domains attached to the app (see the domain operations)"
            }
          },
          "required": [
            "image",
            "imageTag",
            "registryUsername",
            "ports",
            "env",
            "command",
            "entrypoint",
            "startupCommand",
            "healthcheck",
            "restartPolicy",
            "instances",
            "stateful",
            "hardware",
            "placement",
            "grids",
            "volumes",
            "domains"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "github": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "integer",
              "description": "GitHub App installation the repository is read through"
            },
            "repo": {
              "type": "string",
              "description": "owner/name"
            },
            "url": {
              "type": "string"
            },
            "branch": {
              "type": "string",
              "description": "Branch that is built and, with autoDeploy, followed"
            },
            "contextDir": {
              "type": "string"
            },
            "dockerfilePath": {
              "description": "Dockerfile path relative to contextDir; not used while dockerfileContent is set",
              "type": [
                "string",
                "null"
              ]
            },
            "dockerfileOverride": {
              "type": "boolean",
              "description": "An inline Dockerfile (dockerfileContent) is built instead of dockerfilePath"
            },
            "dockerfileContent": {
              "description": "The inline Dockerfile that is built; null when the repository's own file is used",
              "type": [
                "string",
                "null"
              ]
            },
            "autoDeploy": {
              "type": "boolean",
              "description": "Every push to the branch rebuilds and redeploys"
            },
            "clonedFrom": {
              "description": "Public repository (owner/name) the app's repository was copied from at creation; null otherwise",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "installationId",
            "repo",
            "url",
            "branch",
            "contextDir",
            "dockerfilePath",
            "dockerfileOverride",
            "dockerfileContent",
            "autoDeploy",
            "clonedFrom"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ],
      "description": "Repository settings of a GitHub-sourced app"
    },
    "defaultDomain": {
      "description": "Custom domain shown as the app's address in the dashboard; null for the Kinesis-issued one",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "id",
    "projectId",
    "name",
    "guid",
    "source",
    "image",
    "domain",
    "buildState",
    "access",
    "createdBy",
    "createdAt",
    "status",
    "config",
    "github",
    "defaultDomain"
  ],
  "additionalProperties": false
}
```

</details>

## `check_placement`

See whether any server could run an app or a configuration change. Reports servers with capacity now, hibernated ones that would fit once woken, whether one can be provisioned on demand, and why sampled servers were rejected, before creating, updating or starting. With appId the app's stored configuration is checked, config (placement-relevant fields only) layered on top; without appId, config describes an app to be created in the project.

**Group:** `apps` · **Behavior:** Read

**Compact tool:** `apps` · **Action:** `check_placement`

**MCP annotations:** `readOnlyHint: true` · `destructiveHint: false` · `idempotentHint: true` · `openWorldHint: false`

### Permissions and REST equivalents

| Operation            | REST                                                | Required scopes |
| -------------------- | --------------------------------------------------- | --------------- |
| `apps.placement`     | `POST /projects/{projectId}/apps/{appId}/placement` | `apps:read`     |
| `projects.placement` | `POST /projects/{projectId}/placement`              | `apps:read`     |

### Arguments

| Argument    | Type     | Required | Description                                                                                                    |
| ----------- | -------- | -------- | -------------------------------------------------------------------------------------------------------------- |
| `projectId` | `string` | Yes      | Project id                                                                                                     |
| `appId`     | `string` | No       | App id                                                                                                         |
| `config`    | `object` | No       | The placement-relevant parts of an app configuration: instances, stateful, hardware, placement, grids, volumes |

<details>

<summary>Complete input schema</summary>

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "projectId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{24}$",
      "description": "Project id"
    },
    "appId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{24}$",
      "description": "App id"
    },
    "config": {
      "type": "object",
      "properties": {
        "instances": {
          "type": "object",
          "properties": {
            "min": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Instances to keep running"
            },
            "max": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Upper bound for scaling"
            }
          },
          "required": [
            "min",
            "max"
          ],
          "additionalProperties": false,
          "description": "Instance count range"
        },
        "stateful": {
          "type": "boolean",
          "description": "Keep each instance pinned to its server and disk"
        },
        "hardware": {
          "type": "object",
          "properties": {
            "gpuCount": {
              "type": "integer",
              "minimum": 0,
              "maximum": 16,
              "description": "GPUs per instance; 0 for CPU-only. Above 0 needs grids.ids: serverless placement is CPU-only"
            },
            "gpuModels": {
              "maxItems": 16,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              },
              "description": "Acceptable GPU models, e.g. H100; empty means any"
            },
            "gpuManufacturer": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "amd",
                    "apple",
                    "intel",
                    "nvidia",
                    "xilinx"
                  ]
                },
                {
                  "type": "null"
                }
              ],
              "description": "GPU vendor; null means any"
            },
            "gpuVramBytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Minimum VRAM per GPU, in bytes"
            },
            "ramBytes": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991,
              "description": "RAM per instance, in bytes"
            },
            "storageBytes": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991,
              "description": "Disk per instance, in bytes"
            },
            "shmemBytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Shared memory (/dev/shm) size, in bytes"
            }
          },
          "additionalProperties": false,
          "description": "Hardware requirements per instance"
        },
        "placement": {
          "type": "object",
          "properties": {
            "regions": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "us-west",
                  "us-east",
                  "us-central",
                  "ca-west",
                  "ca-east",
                  "ca-central",
                  "eu-west",
                  "eu-north",
                  "eu-east",
                  "eu-south",
                  "eu-central",
                  "eu-south-east",
                  "ap-east",
                  "ap-south-east",
                  "ap-north-east",
                  "ap-south"
                ]
              },
              "description": "Kinesis regions to run in; empty means any"
            },
            "providers": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "csp": {
                    "type": "string",
                    "enum": [
                      "aws",
                      "azure",
                      "gcp",
                      "kinesis"
                    ],
                    "description": "Cloud provider"
                  },
                  "regions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "region": {
                          "type": "string",
                          "minLength": 1,
                          "description": "Provider region"
                        },
                        "zones": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Zones within the region; empty means any"
                        }
                      },
                      "required": [
                        "region",
                        "zones"
                      ],
                      "additionalProperties": false
                    },
                    "description": "Regions of the provider to allow"
                  }
                },
                "required": [
                  "csp",
                  "regions"
                ],
                "additionalProperties": false
              },
              "description": "Restrict placement to specific providers and regions"
            },
            "allowedIps": {
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Source IPs or CIDR ranges allowed to reach the app; empty means everyone"
            }
          },
          "additionalProperties": false,
          "description": "Where the app may run and who may reach it"
        },
        "grids": {
          "type": "object",
          "properties": {
            "ids": {
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              },
              "description": "Grids to run on; empty means serverless (CPU-only), so a GPU app names at least one"
            },
            "priorities": {
              "propertyNames": {
                "type": "string"
              },
              "description": "Priority per grid id, -100 to 100",
              "type": "object",
              "properties": {},
              "additionalProperties": {
                "type": "integer",
                "minimum": -100,
                "maximum": 100
              }
            }
          },
          "additionalProperties": false,
          "description": "Run on grids instead of serverless capacity (members only, on grids they may deploy to)"
        },
        "volumes": {
          "maxItems": 4,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{1,63}$",
                "description": "Volume name, unique within the app"
              },
              "target": {
                "type": "string",
                "pattern": "^\\/.+",
                "description": "Absolute mount path inside the container"
              },
              "declaredSizeBytes": {
                "type": "integer",
                "minimum": 0,
                "maximum": 17592186044416,
                "description": "Expected size, used for placement; 0 or omitted means unspecified"
              }
            },
            "required": [
              "name",
              "target"
            ],
            "additionalProperties": false
          },
          "description": "Persistent volumes"
        }
      },
      "additionalProperties": false,
      "description": "The placement-relevant parts of an app configuration: instances, stateful, hardware, placement, grids, volumes"
    }
  },
  "required": [
    "projectId"
  ],
  "additionalProperties": false
}
```

</details>

### Result

**`apps.placement`**

* `placeable` (`boolean`): A server can take the app now, a hibernated one would fit once woken, or one can be provisioned
* `serversWithCapacity` (`integer`): Servers that match and have room now
* `serversWithoutCapacity` (`integer`): Servers that match but are full
* `wakeable` (`integer`): Hibernated servers that would match once woken (power\_servers wake, or the automatic wake-up on start)
* `wakeableAwaitingStock` (`integer`): Of wakeable, servers whose provider has no stock right now, so a wake would not land yet
* `provisionable` (`boolean`): The platform can provision a matching cloud machine on demand for a serverless app
* `rejections` (`array<object>`): Why sampled servers cannot take the app; each distinct reason appears first, then repeats

<details>

<summary>Response schema: apps.placement</summary>

```json
{
  "type": "object",
  "properties": {
    "placeable": {
      "type": "boolean",
      "description": "A server can take the app now, a hibernated one would fit once woken, or one can be provisioned"
    },
    "serversWithCapacity": {
      "type": "integer",
      "description": "Servers that match and have room now"
    },
    "serversWithoutCapacity": {
      "type": "integer",
      "description": "Servers that match but are full"
    },
    "wakeable": {
      "type": "integer",
      "description": "Hibernated servers that would match once woken (power_servers wake, or the automatic wake-up on start)"
    },
    "wakeableAwaitingStock": {
      "type": "integer",
      "description": "Of wakeable, servers whose provider has no stock right now, so a wake would not land yet"
    },
    "provisionable": {
      "type": "boolean",
      "description": "The platform can provision a matching cloud machine on demand for a serverless app"
    },
    "rejections": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "server": {
            "type": "string",
            "description": "Server address"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "server",
          "reason"
        ],
        "additionalProperties": false
      },
      "description": "Why sampled servers cannot take the app; each distinct reason appears first, then repeats"
    }
  },
  "required": [
    "placeable",
    "serversWithCapacity",
    "serversWithoutCapacity",
    "wakeable",
    "wakeableAwaitingStock",
    "provisionable",
    "rejections"
  ],
  "additionalProperties": false
}
```

</details>

\*\*\`projects.placement\`\*\*

* `placeable` (`boolean`): A server can take the app now, a hibernated one would fit once woken, or one can be provisioned
* `serversWithCapacity` (`integer`): Servers that match and have room now
* `serversWithoutCapacity` (`integer`): Servers that match but are full
* `wakeable` (`integer`): Hibernated servers that would match once woken (power\_servers wake, or the automatic wake-up on start)
* `wakeableAwaitingStock` (`integer`): Of wakeable, servers whose provider has no stock right now, so a wake would not land yet
* `provisionable` (`boolean`): The platform can provision a matching cloud machine on demand for a serverless app
* `rejections` (`array<object>`): Why sampled servers cannot take the app; each distinct reason appears first, then repeats

<details>

<summary>Response schema: projects.placement</summary>

```json
{
  "type": "object",
  "properties": {
    "placeable": {
      "type": "boolean",
      "description": "A server can take the app now, a hibernated one would fit once woken, or one can be provisioned"
    },
    "serversWithCapacity": {
      "type": "integer",
      "description": "Servers that match and have room now"
    },
    "serversWithoutCapacity": {
      "type": "integer",
      "description": "Servers that match but are full"
    },
    "wakeable": {
      "type": "integer",
      "description": "Hibernated servers that would match once woken (power_servers wake, or the automatic wake-up on start)"
    },
    "wakeableAwaitingStock": {
      "type": "integer",
      "description": "Of wakeable, servers whose provider has no stock right now, so a wake would not land yet"
    },
    "provisionable": {
      "type": "boolean",
      "description": "The platform can provision a matching cloud machine on demand for a serverless app"
    },
    "rejections": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "server": {
            "type": "string",
            "description": "Server address"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "server",
          "reason"
        ],
        "additionalProperties": false
      },
      "description": "Why sampled servers cannot take the app; each distinct reason appears first, then repeats"
    }
  },
  "required": [
    "placeable",
    "serversWithCapacity",
    "serversWithoutCapacity",
    "wakeable",
    "wakeableAwaitingStock",
    "provisionable",
    "rejections"
  ],
  "additionalProperties": false
}
```

</details>

## `create_app`

Create an app from an image or a GitHub repository and start it. config.image pulls an image; source builds a connected repository (one without a Dockerfile takes an inline source.dockerfileContent); the start begins spending credits. envFrom copies another app's environment variables, secret values included, on the server. Omitted config fields take the dashboard defaults (1 GiB RAM, 1 GB disk, 1 to 3 instances, no GPU; a GPU app needs config.grids.ids). Returns the app and how the automatic start went; call get\_app\_status to follow it, or get\_build with buildId for a repository app. read\_docs(deploy) lists every field.

**Group:** `apps` · **Behavior:** Write

**Compact tool:** `apps_write` · **Action:** `create_app`

**MCP annotations:** `readOnlyHint: false` · `destructiveHint: false` · `idempotentHint: false` · `openWorldHint: true`

### Permissions and REST equivalents

| Operation     | REST                              | Required scopes               |
| ------------- | --------------------------------- | ----------------------------- |
| `apps.create` | `POST /projects/{projectId}/apps` | `apps:write`, `compute:spend` |

### Arguments

| Argument         | Type     | Required | Description                                                                                                                                                           |
| ---------------- | -------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`           | `string` | Yes      | App name                                                                                                                                                              |
| `config`         | `object` | Yes      | Initial configuration; image is required unless source is set                                                                                                         |
| `source`         | `object` | No       | Build the image from a GitHub repository the caller connected (members of the project's organization); omit to pull config.image                                      |
| `envFrom`        | `object` | No       | Copy another app's environment variables, secret values included, on the server (developer access to that app); use overrides instead of config.env                   |
| `projectId`      | `string` | Yes      | Project to create the app in                                                                                                                                          |
| `idempotencyKey` | `string` | No       | Unique string without whitespace; send the same one with the same arguments when retrying after a timeout, and the original result comes back instead of acting twice |

<details>

<summary>Complete input schema</summary>

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "App name"
    },
    "config": {
      "type": "object",
      "properties": {
        "image": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "description": "Container image reference, e.g. nginx:1.27 or ghcr.io/org/app:tag"
        },
        "registryAuth": {
          "type": "object",
          "properties": {
            "username": {
              "type": "string",
              "minLength": 1,
              "description": "Registry login"
            },
            "password": {
              "type": "string",
              "minLength": 1,
              "description": "Registry password or token (write-only)"
            }
          },
          "required": [
            "username",
            "password"
          ],
          "additionalProperties": false,
          "description": "Credentials for a private image"
        },
        "ports": {
          "maxItems": 32,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "port": {
                "type": "integer",
                "minimum": 1,
                "maximum": 65535,
                "description": "Container port"
              },
              "protocol": {
                "type": "string",
                "enum": [
                  "tcp",
                  "udp",
                  "tcp_load_balancer",
                  "tcps_load_balancer",
                  "http_load_balancer",
                  "https_load_balancer",
                  "http80_load_balancer",
                  "https443_load_balancer",
                  "grpcs_load_balancer"
                ],
                "description": "How the port is exposed"
              }
            },
            "required": [
              "port",
              "protocol"
            ],
            "additionalProperties": {}
          },
          "description": "Ports to expose"
        },
        "env": {
          "maxItems": 200,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string",
                "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
                "description": "Variable name"
              },
              "value": {
                "description": "Value; null keeps the stored value of an existing variable",
                "type": [
                  "string",
                  "null"
                ]
              },
              "secret": {
                "type": "boolean",
                "description": "Store as a secret: never returned by reads"
              }
            },
            "required": [
              "key",
              "value"
            ],
            "additionalProperties": {}
          },
          "description": "Environment variables"
        },
        "command": {
          "maxItems": 256,
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Container command (CMD) override"
        },
        "entrypoint": {
          "maxItems": 256,
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Container entrypoint override"
        },
        "startupCommand": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "args": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Command and arguments"
                },
                "user": {
                  "type": "string",
                  "description": "User to run as"
                },
                "timeoutSec": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991,
                  "description": "Seconds before the command is considered failed"
                },
                "startPeriodSec": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991,
                  "description": "Seconds to wait after the container starts"
                }
              },
              "required": [
                "args"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ],
          "description": "Command run inside the container once it starts; null clears it"
        },
        "healthcheck": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "test": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Command that must exit 0 for the app to count as healthy"
                },
                "intervalSec": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 9007199254740991,
                  "description": "Seconds between checks"
                }
              },
              "required": [
                "test",
                "intervalSec"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ],
          "description": "Container health check; null clears it"
        },
        "restartPolicy": {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "disabled",
                "always",
                "on_failure",
                "task_completion"
              ],
              "description": "When to restart a container that exits"
            },
            "startTimeoutSec": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Seconds a start may take before it counts as failed"
            },
            "maxRetriesPerNode": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Restarts allowed on one server before moving on"
            },
            "maxErrorTolerance": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Failures tolerated before the app is stopped"
            },
            "numTasks": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "For task_completion: runs to complete before stopping"
            }
          },
          "required": [
            "mode"
          ],
          "additionalProperties": false,
          "description": "Restart behaviour"
        },
        "instances": {
          "type": "object",
          "properties": {
            "min": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Instances to keep running"
            },
            "max": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Upper bound for scaling"
            }
          },
          "required": [
            "min",
            "max"
          ],
          "additionalProperties": false,
          "description": "Instance count range"
        },
        "stateful": {
          "type": "boolean",
          "description": "Keep each instance pinned to its server and disk"
        },
        "hardware": {
          "type": "object",
          "properties": {
            "gpuCount": {
              "type": "integer",
              "minimum": 0,
              "maximum": 16,
              "description": "GPUs per instance; 0 for CPU-only. Above 0 needs grids.ids: serverless placement is CPU-only"
            },
            "gpuModels": {
              "maxItems": 16,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              },
              "description": "Acceptable GPU models, e.g. H100; empty means any"
            },
            "gpuManufacturer": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "amd",
                    "apple",
                    "intel",
                    "nvidia",
                    "xilinx"
                  ]
                },
                {
                  "type": "null"
                }
              ],
              "description": "GPU vendor; null means any"
            },
            "gpuVramBytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Minimum VRAM per GPU, in bytes"
            },
            "ramBytes": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991,
              "description": "RAM per instance, in bytes"
            },
            "storageBytes": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991,
              "description": "Disk per instance, in bytes"
            },
            "shmemBytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Shared memory (/dev/shm) size, in bytes"
            }
          },
          "additionalProperties": false,
          "description": "Hardware requirements per instance"
        },
        "placement": {
          "type": "object",
          "properties": {
            "regions": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "us-west",
                  "us-east",
                  "us-central",
                  "ca-west",
                  "ca-east",
                  "ca-central",
                  "eu-west",
                  "eu-north",
                  "eu-east",
                  "eu-south",
                  "eu-central",
                  "eu-south-east",
                  "ap-east",
                  "ap-south-east",
                  "ap-north-east",
                  "ap-south"
                ]
              },
              "description": "Kinesis regions to run in; empty means any"
            },
            "providers": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "csp": {
                    "type": "string",
                    "enum": [
                      "aws",
                      "azure",
                      "gcp",
                      "kinesis"
                    ],
                    "description": "Cloud provider"
                  },
                  "regions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "region": {
                          "type": "string",
                          "minLength": 1,
                          "description": "Provider region"
                        },
                        "zones": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Zones within the region; empty means any"
                        }
                      },
                      "required": [
                        "region",
                        "zones"
                      ],
                      "additionalProperties": false
                    },
                    "description": "Regions of the provider to allow"
                  }
                },
                "required": [
                  "csp",
                  "regions"
                ],
                "additionalProperties": false
              },
              "description": "Restrict placement to specific providers and regions"
            },
            "allowedIps": {
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Source IPs or CIDR ranges allowed to reach the app; empty means everyone"
            }
          },
          "additionalProperties": false,
          "description": "Where the app may run and who may reach it"
        },
        "grids": {
          "type": "object",
          "properties": {
            "ids": {
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              },
              "description": "Grids to run on; empty means serverless (CPU-only), so a GPU app names at least one"
            },
            "priorities": {
              "propertyNames": {
                "type": "string"
              },
              "description": "Priority per grid id, -100 to 100",
              "type": "object",
              "properties": {},
              "additionalProperties": {
                "type": "integer",
                "minimum": -100,
                "maximum": 100
              }
            }
          },
          "additionalProperties": false,
          "description": "Run on grids instead of serverless capacity (members only, on grids they may deploy to)"
        },
        "volumes": {
          "maxItems": 4,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{1,63}$",
                "description": "Volume name, unique within the app"
              },
              "target": {
                "type": "string",
                "pattern": "^\\/.+",
                "description": "Absolute mount path inside the container"
              },
              "declaredSizeBytes": {
                "type": "integer",
                "minimum": 0,
                "maximum": 17592186044416,
                "description": "Expected size, used for placement; 0 or omitted means unspecified"
              }
            },
            "required": [
              "name",
              "target"
            ],
            "additionalProperties": false
          },
          "description": "Persistent volumes"
        }
      },
      "additionalProperties": false,
      "description": "Initial configuration; image is required unless source is set"
    },
    "source": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "github",
          "description": "Build the image from a GitHub repository"
        },
        "installationId": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991,
          "description": "GitHub App installation id, from the connected accounts list"
        },
        "repo": {
          "type": "string",
          "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})\\/[A-Za-z0-9._-]{1,100}$",
          "description": "Repository as owner/name; omit with clone"
        },
        "clone": {
          "type": "object",
          "properties": {
            "sourceRepo": {
              "type": "string",
              "minLength": 3,
              "maxLength": 300,
              "description": "Public GitHub repository to copy: a github.com URL (optionally .../tree/<branch>) or owner/name"
            },
            "sourceRef": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "description": "Branch, tag or commit to copy; default: the source's default branch"
            },
            "targetRepoName": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._-]{1,100}$",
              "description": "Name of the new repository under the connected account (installationId)"
            },
            "targetVisibility": {
              "type": "string",
              "enum": [
                "private",
                "public"
              ],
              "description": "Visibility of the new repository; private by default"
            }
          },
          "required": [
            "sourceRepo",
            "targetRepoName"
          ],
          "additionalProperties": false,
          "description": "Copy a public repository into the connected account and build from the copy, instead of repo"
        },
        "branch": {
          "type": "string",
          "minLength": 1,
          "maxLength": 255,
          "description": "Branch to build and follow; default: the repository's default branch"
        },
        "contextDir": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "description": "Directory the image is built from, relative to the repository root (default /)"
        },
        "dockerfilePath": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "description": "Dockerfile path relative to contextDir (default Dockerfile)"
        },
        "autoDeploy": {
          "type": "boolean",
          "description": "Rebuild and redeploy on every push to the branch (default true)"
        },
        "dockerfileContent": {
          "type": "string",
          "maxLength": 65536,
          "description": "Inline Dockerfile built instead of dockerfilePath; how a repository without one is deployed"
        }
      },
      "required": [
        "kind",
        "installationId"
      ],
      "additionalProperties": false,
      "description": "Build the image from a GitHub repository the caller connected (members of the project's organization); omit to pull config.image"
    },
    "envFrom": {
      "type": "object",
      "properties": {
        "projectId": {
          "type": "string",
          "pattern": "^[0-9a-fA-F]{24}$",
          "description": "Project of the app to copy from"
        },
        "appId": {
          "type": "string",
          "pattern": "^[0-9a-fA-F]{24}$",
          "description": "App to copy the variables from"
        },
        "overrides": {
          "maxItems": 200,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string",
                "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
                "description": "Variable name"
              },
              "value": {
                "description": "Value; null keeps the copied value (a copied secret stays secret)",
                "type": [
                  "string",
                  "null"
                ]
              },
              "secret": {
                "type": "boolean",
                "description": "Store as a secret: never returned by reads"
              }
            },
            "required": [
              "key",
              "value"
            ],
            "additionalProperties": {}
          },
          "description": "Variables set on top of the copied ones, by key; a null value keeps the copied value"
        }
      },
      "required": [
        "projectId",
        "appId"
      ],
      "additionalProperties": false,
      "description": "Copy another app's environment variables, secret values included, on the server (developer access to that app); use overrides instead of config.env"
    },
    "projectId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{24}$",
      "description": "Project to create the app in"
    },
    "idempotencyKey": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255,
      "pattern": "^\\S+$",
      "description": "Unique string without whitespace; send the same one with the same arguments when retrying after a timeout, and the original result comes back instead of acting twice"
    }
  },
  "required": [
    "name",
    "config",
    "projectId"
  ],
  "additionalProperties": false
}
```

</details>

<details>

<summary>OpenAI profile input schema</summary>

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "App name"
    },
    "config": {
      "type": "object",
      "properties": {
        "image": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "description": "Container image reference, e.g. nginx:1.27 or ghcr.io/org/app:tag"
        },
        "ports": {
          "maxItems": 32,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "port": {
                "type": "integer",
                "minimum": 1,
                "maximum": 65535,
                "description": "Container port"
              },
              "protocol": {
                "type": "string",
                "enum": [
                  "tcp",
                  "udp",
                  "tcp_load_balancer",
                  "tcps_load_balancer",
                  "http_load_balancer",
                  "https_load_balancer",
                  "http80_load_balancer",
                  "https443_load_balancer",
                  "grpcs_load_balancer"
                ],
                "description": "How the port is exposed"
              }
            },
            "required": [
              "port",
              "protocol"
            ],
            "additionalProperties": {}
          },
          "description": "Ports to expose"
        },
        "env": {
          "maxItems": 200,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string",
                "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
                "description": "Variable name"
              },
              "value": {
                "description": "Value; null keeps the stored value of an existing variable",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "key",
              "value"
            ],
            "additionalProperties": {}
          },
          "description": "Environment variables"
        },
        "command": {
          "maxItems": 256,
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Container command (CMD) override"
        },
        "entrypoint": {
          "maxItems": 256,
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Container entrypoint override"
        },
        "startupCommand": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "args": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Command and arguments"
                },
                "user": {
                  "type": "string",
                  "description": "User to run as"
                },
                "timeoutSec": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991,
                  "description": "Seconds before the command is considered failed"
                },
                "startPeriodSec": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991,
                  "description": "Seconds to wait after the container starts"
                }
              },
              "required": [
                "args"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ],
          "description": "Command run inside the container once it starts; null clears it"
        },
        "healthcheck": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "test": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Command that must exit 0 for the app to count as healthy"
                },
                "intervalSec": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 9007199254740991,
                  "description": "Seconds between checks"
                }
              },
              "required": [
                "test",
                "intervalSec"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ],
          "description": "Container health check; null clears it"
        },
        "restartPolicy": {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "disabled",
                "always",
                "on_failure",
                "task_completion"
              ],
              "description": "When to restart a container that exits"
            },
            "startTimeoutSec": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Seconds a start may take before it counts as failed"
            },
            "maxRetriesPerNode": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Restarts allowed on one server before moving on"
            },
            "maxErrorTolerance": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Failures tolerated before the app is stopped"
            },
            "numTasks": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "For task_completion: runs to complete before stopping"
            }
          },
          "required": [
            "mode"
          ],
          "additionalProperties": false,
          "description": "Restart behaviour"
        },
        "instances": {
          "type": "object",
          "properties": {
            "min": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Instances to keep running"
            },
            "max": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Upper bound for scaling"
            }
          },
          "required": [
            "min",
            "max"
          ],
          "additionalProperties": false,
          "description": "Instance count range"
        },
        "stateful": {
          "type": "boolean",
          "description": "Keep each instance pinned to its server and disk"
        },
        "hardware": {
          "type": "object",
          "properties": {
            "gpuCount": {
              "type": "integer",
              "minimum": 0,
              "maximum": 16,
              "description": "GPUs per instance; 0 for CPU-only. Above 0 needs grids.ids: serverless placement is CPU-only"
            },
            "gpuModels": {
              "maxItems": 16,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              },
              "description": "Acceptable GPU models, e.g. H100; empty means any"
            },
            "gpuManufacturer": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "amd",
                    "apple",
                    "intel",
                    "nvidia",
                    "xilinx"
                  ]
                },
                {
                  "type": "null"
                }
              ],
              "description": "GPU vendor; null means any"
            },
            "gpuVramBytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Minimum VRAM per GPU, in bytes"
            },
            "ramBytes": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991,
              "description": "RAM per instance, in bytes"
            },
            "storageBytes": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991,
              "description": "Disk per instance, in bytes"
            },
            "shmemBytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Shared memory (/dev/shm) size, in bytes"
            }
          },
          "additionalProperties": false,
          "description": "Hardware requirements per instance"
        },
        "placement": {
          "type": "object",
          "properties": {
            "regions": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "us-west",
                  "us-east",
                  "us-central",
                  "ca-west",
                  "ca-east",
                  "ca-central",
                  "eu-west",
                  "eu-north",
                  "eu-east",
                  "eu-south",
                  "eu-central",
                  "eu-south-east",
                  "ap-east",
                  "ap-south-east",
                  "ap-north-east",
                  "ap-south"
                ]
              },
              "description": "Kinesis regions to run in; empty means any"
            },
            "providers": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "csp": {
                    "type": "string",
                    "enum": [
                      "aws",
                      "azure",
                      "gcp",
                      "kinesis"
                    ],
                    "description": "Cloud provider"
                  },
                  "regions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "region": {
                          "type": "string",
                          "minLength": 1,
                          "description": "Provider region"
                        },
                        "zones": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Zones within the region; empty means any"
                        }
                      },
                      "required": [
                        "region",
                        "zones"
                      ],
                      "additionalProperties": false
                    },
                    "description": "Regions of the provider to allow"
                  }
                },
                "required": [
                  "csp",
                  "regions"
                ],
                "additionalProperties": false
              },
              "description": "Restrict placement to specific providers and regions"
            },
            "allowedIps": {
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Source IPs or CIDR ranges allowed to reach the app; empty means everyone"
            }
          },
          "additionalProperties": false,
          "description": "Where the app may run and who may reach it"
        },
        "grids": {
          "type": "object",
          "properties": {
            "ids": {
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              },
              "description": "Grids to run on; empty means serverless (CPU-only), so a GPU app names at least one"
            },
            "priorities": {
              "propertyNames": {
                "type": "string"
              },
              "description": "Priority per grid id, -100 to 100",
              "type": "object",
              "properties": {},
              "additionalProperties": {
                "type": "integer",
                "minimum": -100,
                "maximum": 100
              }
            }
          },
          "additionalProperties": false,
          "description": "Run on grids instead of serverless capacity (members only, on grids they may deploy to)"
        },
        "volumes": {
          "maxItems": 4,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{1,63}$",
                "description": "Volume name, unique within the app"
              },
              "target": {
                "type": "string",
                "pattern": "^\\/.+",
                "description": "Absolute mount path inside the container"
              },
              "declaredSizeBytes": {
                "type": "integer",
                "minimum": 0,
                "maximum": 17592186044416,
                "description": "Expected size, used for placement; 0 or omitted means unspecified"
              }
            },
            "required": [
              "name",
              "target"
            ],
            "additionalProperties": false
          },
          "description": "Persistent volumes"
        }
      },
      "additionalProperties": false,
      "description": "Initial configuration; image is required unless source is set"
    },
    "source": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "github",
          "description": "Build the image from a GitHub repository"
        },
        "installationId": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991,
          "description": "GitHub App installation id, from the connected accounts list"
        },
        "repo": {
          "type": "string",
          "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})\\/[A-Za-z0-9._-]{1,100}$",
          "description": "Repository as owner/name; omit with clone"
        },
        "clone": {
          "type": "object",
          "properties": {
            "sourceRepo": {
              "type": "string",
              "minLength": 3,
              "maxLength": 300,
              "description": "Public GitHub repository to copy: a github.com URL (optionally .../tree/<branch>) or owner/name"
            },
            "sourceRef": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "description": "Branch, tag or commit to copy; default: the source's default branch"
            },
            "targetRepoName": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._-]{1,100}$",
              "description": "Name of the new repository under the connected account (installationId)"
            },
            "targetVisibility": {
              "type": "string",
              "enum": [
                "private",
                "public"
              ],
              "description": "Visibility of the new repository; private by default"
            }
          },
          "required": [
            "sourceRepo",
            "targetRepoName"
          ],
          "additionalProperties": false,
          "description": "Copy a public repository into the connected account and build from the copy, instead of repo"
        },
        "branch": {
          "type": "string",
          "minLength": 1,
          "maxLength": 255,
          "description": "Branch to build and follow; default: the repository's default branch"
        },
        "contextDir": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "description": "Directory the image is built from, relative to the repository root (default /)"
        },
        "dockerfilePath": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "description": "Dockerfile path relative to contextDir (default Dockerfile)"
        },
        "autoDeploy": {
          "type": "boolean",
          "description": "Rebuild and redeploy on every push to the branch (default true)"
        },
        "dockerfileContent": {
          "type": "string",
          "maxLength": 65536,
          "description": "Inline Dockerfile built instead of dockerfilePath; how a repository without one is deployed"
        }
      },
      "required": [
        "kind",
        "installationId"
      ],
      "additionalProperties": false,
      "description": "Build the image from a GitHub repository the caller connected (members of the project's organization); omit to pull config.image"
    },
    "envFrom": {
      "type": "object",
      "properties": {
        "projectId": {
          "type": "string",
          "pattern": "^[0-9a-fA-F]{24}$",
          "description": "Project of the app to copy from"
        },
        "appId": {
          "type": "string",
          "pattern": "^[0-9a-fA-F]{24}$",
          "description": "App to copy the variables from"
        },
        "overrides": {
          "maxItems": 200,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string",
                "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
                "description": "Variable name"
              },
              "value": {
                "description": "Value; null keeps the copied value (a copied secret stays secret)",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "key",
              "value"
            ],
            "additionalProperties": {}
          },
          "description": "Variables set on top of the copied ones, by key; a null value keeps the copied value"
        }
      },
      "required": [
        "projectId",
        "appId"
      ],
      "additionalProperties": false,
      "description": "Copy another app's environment variables, secret values included, on the server (developer access to that app); use overrides instead of config.env"
    },
    "projectId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{24}$",
      "description": "Project to create the app in"
    },
    "idempotencyKey": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255,
      "pattern": "^\\S+$",
      "description": "Unique string without whitespace; send the same one with the same arguments when retrying after a timeout, and the original result comes back instead of acting twice"
    }
  },
  "required": [
    "name",
    "config",
    "projectId"
  ],
  "additionalProperties": false
}
```

</details>

### Result

* `id` (`string`): App id
* `projectId` (`string`): See the complete response schema below.
* `name` (`string`): See the complete response schema below.
* `guid` (`string`): Runtime identifier of the app
* `source` (`string or null`): Where the image comes from: Docker Hub, a registry link, GitHub or an upload
* `image` (`string or null`): See the complete response schema below.
* `domain` (`string or null`): Hostname the app answers on: the default custom domain, else the Kinesis-issued one
* `buildState` (`string or null`): Build pipeline state for GitHub-sourced apps
* `access` (`object`): See the complete response schema below.
* `createdBy` (`object or null`): Who created it. Null when nobody is on record, for another organization's, and for a credential without members:read
* `createdAt` (`string`): ISO 8601 timestamp (UTC)
* `status` (`object`): Status as last cached; use the status endpoint for a live read
* `config` (`object or null`): See the complete response schema below.
* `github` (`object or null`): Repository settings of a GitHub-sourced app
* `defaultDomain` (`string or null`): Custom domain shown as the app's address in the dashboard; null for the Kinesis-issued one
* `start` (`object`): How the automatic start after creation went
* `buildId` (`string or null`): First build of a GitHub-sourced app; null for image apps

<details>

<summary>Response schema: apps.create</summary>

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "App id"
    },
    "projectId": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "guid": {
      "type": "string",
      "description": "Runtime identifier of the app"
    },
    "source": {
      "description": "Where the image comes from: Docker Hub, a registry link, GitHub or an upload",
      "type": [
        "string",
        "null"
      ]
    },
    "image": {
      "type": [
        "string",
        "null"
      ]
    },
    "domain": {
      "description": "Hostname the app answers on: the default custom domain, else the Kinesis-issued one",
      "type": [
        "string",
        "null"
      ]
    },
    "buildState": {
      "description": "Build pipeline state for GitHub-sourced apps",
      "type": [
        "string",
        "null"
      ]
    },
    "access": {
      "type": "object",
      "properties": {
        "role": {
          "type": "string",
          "enum": [
            "admin",
            "developer",
            "viewer"
          ],
          "description": "The caller's role on it"
        },
        "outside": {
          "type": "boolean",
          "description": "Shared with the caller from another organization"
        },
        "isCreator": {
          "type": "boolean",
          "description": "The caller created it"
        }
      },
      "required": [
        "role",
        "outside",
        "isCreator"
      ],
      "additionalProperties": false
    },
    "createdBy": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "userId": {
              "type": "string",
              "description": "User id, as members.list and the sharing calls use it"
            },
            "name": {
              "type": [
                "string",
                "null"
              ]
            },
            "email": {
              "type": "string"
            }
          },
          "required": [
            "userId",
            "name",
            "email"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ],
      "description": "Who created it. Null when nobody is on record, for another organization's, and for a credential without members:read"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 timestamp (UTC)"
    },
    "status": {
      "type": "object",
      "properties": {
        "state": {
          "type": "string",
          "enum": [
            "unknown",
            "running",
            "stopped",
            "starting",
            "stopping",
            "scaling",
            "updating",
            "downloading",
            "provisioning",
            "start_blocked",
            "error",
            "building",
            "build_failed"
          ],
          "description": "Aggregate state; build states win while there is no runnable image"
        },
        "targetState": {
          "type": "string",
          "enum": [
            "running",
            "stopped",
            "unknown"
          ],
          "description": "What the runtime was last asked for; unknown until it has been asked, as for a repository app before its first build succeeds"
        },
        "nodes": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "address": {
                "type": "string"
              },
              "state": {
                "type": "string"
              },
              "reportedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "description": "ISO 8601 timestamp (UTC)"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "When the server last reported this state; not a start time"
              }
            },
            "required": [
              "address",
              "state",
              "reportedAt"
            ],
            "additionalProperties": false
          },
          "description": "Servers the app is placed on and the container state on each"
        },
        "endpoints": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "port": {
                "type": "integer",
                "description": "Container port, as in config.ports"
              },
              "protocol": {
                "type": "string",
                "description": "Protocol of that port, as in config.ports"
              },
              "address": {
                "description": "An http(s) URL for the HTTP protocols, host:port for the others; null until the endpoint is wired",
                "type": [
                  "string",
                  "null"
                ]
              },
              "server": {
                "description": "Server address of a direct tcp or udp endpoint; null when load-balanced",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "port",
              "protocol",
              "address",
              "server"
            ],
            "additionalProperties": false
          },
          "description": "Where each configured port answers; a load-balanced port gets its address a minute or two after the first start"
        },
        "errors": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "description": "ISO 8601 timestamp (UTC)"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "details": {
                "anyOf": [
                  {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Extra data the runtime attached, such as the grid or server involved"
              }
            },
            "required": [
              "type",
              "message",
              "at",
              "details"
            ],
            "additionalProperties": false
          },
          "description": "Recent runtime errors, newest first"
        },
        "workOrders": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "description": "What the runtime asked the server to do"
              },
              "server": {
                "type": "string",
                "description": "Server address"
              },
              "status": {
                "type": "string"
              },
              "createdAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "description": "ISO 8601 timestamp (UTC)"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "startedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "description": "ISO 8601 timestamp (UTC)"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "completedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "description": "ISO 8601 timestamp (UTC)"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "type",
              "server",
              "status",
              "createdAt",
              "startedAt",
              "completedAt"
            ],
            "additionalProperties": false
          },
          "description": "The runtime's latest instructions to servers, newest first; an order that never completes is the stall"
        },
        "grid": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "fill": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "target": {
                          "type": "integer",
                          "description": "Members the grid is composed to have"
                        },
                        "online": {
                          "type": "integer",
                          "description": "Members the app runs on"
                        },
                        "pending": {
                          "type": "integer"
                        },
                        "converging": {
                          "type": "boolean",
                          "description": "The grid is still acquiring members or placing the app"
                        }
                      },
                      "required": [
                        "target",
                        "online",
                        "pending",
                        "converging"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "How far the grid has filled for this app"
                },
                "idleReclaim": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "gridId": {
                        "type": "string"
                      },
                      "warnedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "description": "ISO 8601 timestamp (UTC)"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "evictAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "description": "ISO 8601 timestamp (UTC)"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "When the app becomes evictable; null when the grid only warns"
                      },
                      "evictedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "description": "ISO 8601 timestamp (UTC)"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "cooldownEndsAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "description": "ISO 8601 timestamp (UTC)"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "When the grid takes the app again after an eviction"
                      },
                      "evidence": {
                        "type": "string",
                        "description": "Why the grid considers the app idle"
                      }
                    },
                    "required": [
                      "gridId",
                      "warnedAt",
                      "evictAt",
                      "evictedAt",
                      "cooldownEndsAt",
                      "evidence"
                    ],
                    "additionalProperties": false
                  },
                  "description": "Grids whose idle policy has warned or evicted the app"
                },
                "queue": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "gridId": {
                        "type": "string"
                      },
                      "position": {
                        "type": "integer",
                        "description": "1-based place in the grid's fair-share queue"
                      },
                      "queueLength": {
                        "type": "integer"
                      },
                      "enqueuedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "description": "ISO 8601 timestamp (UTC)"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "held": {
                        "type": "boolean",
                        "description": "The scheduler keeps the app off the grid until its turn comes"
                      }
                    },
                    "required": [
                      "gridId",
                      "position",
                      "queueLength",
                      "enqueuedAt",
                      "held"
                    ],
                    "additionalProperties": false
                  },
                  "description": "Full grids the app is queued on"
                }
              },
              "required": [
                "fill",
                "idleReclaim",
                "queue"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ],
          "description": "Grid placement details; null for a serverless app"
        },
        "pollAfterSec": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Seconds to wait before reading the status again while it is changing; null in a settled state"
        }
      },
      "required": [
        "state",
        "targetState",
        "nodes",
        "endpoints",
        "errors",
        "workOrders",
        "grid",
        "pollAfterSec"
      ],
      "additionalProperties": false,
      "description": "Status as last cached; use the status endpoint for a live read"
    },
    "config": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "image": {
              "type": "string",
              "description": "Container image reference"
            },
            "imageTag": {
              "description": "Tag, kept separately for Docker Hub images",
              "type": [
                "string",
                "null"
              ]
            },
            "registryUsername": {
              "description": "Registry login; the password is write-only",
              "type": [
                "string",
                "null"
              ]
            },
            "ports": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "port": {
                    "type": "integer"
                  },
                  "protocol": {
                    "type": "string"
                  }
                },
                "required": [
                  "port",
                  "protocol"
                ],
                "additionalProperties": false
              }
            },
            "env": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string"
                  },
                  "value": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "secret": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "key",
                  "value",
                  "secret"
                ],
                "additionalProperties": false
              },
              "description": "Environment variables; value is null for secrets, and on a connection that takes no credentials for values that look like one (null keeps a value on update)"
            },
            "command": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "entrypoint": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "startupCommand": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "args": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "user": {
                      "type": "string"
                    },
                    "timeoutSec": {
                      "type": "number"
                    },
                    "startPeriodSec": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "args",
                    "user",
                    "timeoutSec",
                    "startPeriodSec"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "healthcheck": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "test": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "intervalSec": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "test",
                    "intervalSec"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "restartPolicy": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string"
                    },
                    "startTimeoutSec": {
                      "type": "number"
                    },
                    "maxRetriesPerNode": {
                      "type": "number"
                    },
                    "maxErrorTolerance": {
                      "type": "number"
                    },
                    "numTasks": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "mode",
                    "startTimeoutSec",
                    "maxRetriesPerNode",
                    "maxErrorTolerance",
                    "numTasks"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "instances": {
              "type": "object",
              "properties": {
                "min": {
                  "type": "integer"
                },
                "max": {
                  "type": "integer"
                }
              },
              "required": [
                "min",
                "max"
              ],
              "additionalProperties": false
            },
            "stateful": {
              "type": "boolean"
            },
            "hardware": {
              "type": "object",
              "properties": {
                "gpuCount": {
                  "type": "integer"
                },
                "gpuModels": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "gpuManufacturer": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "gpuVramBytes": {
                  "type": "number"
                },
                "ramBytes": {
                  "type": "number"
                },
                "storageBytes": {
                  "type": "number"
                },
                "shmemBytes": {
                  "type": "number"
                }
              },
              "required": [
                "gpuCount",
                "gpuModels",
                "gpuManufacturer",
                "gpuVramBytes",
                "ramBytes",
                "storageBytes",
                "shmemBytes"
              ],
              "additionalProperties": false
            },
            "placement": {
              "type": "object",
              "properties": {
                "regions": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Kinesis regions, e.g. us-west"
                },
                "providers": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "csp": {
                        "type": "string"
                      },
                      "regions": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "region": {
                              "type": "string"
                            },
                            "zones": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "region",
                            "zones"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "csp",
                      "regions"
                    ],
                    "additionalProperties": false
                  }
                },
                "allowedIps": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Source IPs or CIDR ranges allowed to reach the app"
                }
              },
              "required": [
                "regions",
                "providers",
                "allowedIps"
              ],
              "additionalProperties": false
            },
            "grids": {
              "type": "object",
              "properties": {
                "ids": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "priorities": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "number"
                  },
                  "description": "Priority per grid id"
                }
              },
              "required": [
                "ids",
                "priorities"
              ],
              "additionalProperties": false
            },
            "volumes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "target": {
                    "type": "string"
                  },
                  "declaredSizeBytes": {
                    "type": "number"
                  }
                },
                "required": [
                  "name",
                  "target",
                  "declaredSizeBytes"
                ],
                "additionalProperties": false
              }
            },
            "domains": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Custom domains attached to the app (see the domain operations)"
            }
          },
          "required": [
            "image",
            "imageTag",
            "registryUsername",
            "ports",
            "env",
            "command",
            "entrypoint",
            "startupCommand",
            "healthcheck",
            "restartPolicy",
            "instances",
            "stateful",
            "hardware",
            "placement",
            "grids",
            "volumes",
            "domains"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "github": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "integer",
              "description": "GitHub App installation the repository is read through"
            },
            "repo": {
              "type": "string",
              "description": "owner/name"
            },
            "url": {
              "type": "string"
            },
            "branch": {
              "type": "string",
              "description": "Branch that is built and, with autoDeploy, followed"
            },
            "contextDir": {
              "type": "string"
            },
            "dockerfilePath": {
              "description": "Dockerfile path relative to contextDir; not used while dockerfileContent is set",
              "type": [
                "string",
                "null"
              ]
            },
            "dockerfileOverride": {
              "type": "boolean",
              "description": "An inline Dockerfile (dockerfileContent) is built instead of dockerfilePath"
            },
            "dockerfileContent": {
              "description": "The inline Dockerfile that is built; null when the repository's own file is used",
              "type": [
                "string",
                "null"
              ]
            },
            "autoDeploy": {
              "type": "boolean",
              "description": "Every push to the branch rebuilds and redeploys"
            },
            "clonedFrom": {
              "description": "Public repository (owner/name) the app's repository was copied from at creation; null otherwise",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "installationId",
            "repo",
            "url",
            "branch",
            "contextDir",
            "dockerfilePath",
            "dockerfileOverride",
            "dockerfileContent",
            "autoDeploy",
            "clonedFrom"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ],
      "description": "Repository settings of a GitHub-sourced app"
    },
    "defaultDomain": {
      "description": "Custom domain shown as the app's address in the dashboard; null for the Kinesis-issued one",
      "type": [
        "string",
        "null"
      ]
    },
    "start": {
      "type": "object",
      "properties": {
        "state": {
          "type": "string",
          "enum": [
            "requested",
            "deferred",
            "building",
            "failed"
          ],
          "description": "requested: the start was accepted, poll the status to follow it; deferred: machines are being provisioned for the app first, poll the status; building: the app starts once its first build succeeds, poll the build; failed: the app exists but is stopped, see error"
        },
        "error": {
          "description": "Why the automatic start failed",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "state",
        "error"
      ],
      "additionalProperties": false,
      "description": "How the automatic start after creation went"
    },
    "buildId": {
      "description": "First build of a GitHub-sourced app; null for image apps",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "id",
    "projectId",
    "name",
    "guid",
    "source",
    "image",
    "domain",
    "buildState",
    "access",
    "createdBy",
    "createdAt",
    "status",
    "config",
    "github",
    "defaultDomain",
    "start",
    "buildId"
  ],
  "additionalProperties": false
}
```

</details>

Operation-specific errors: `402 balance_over_limit`, `429 app_creation_quota_exceeded`, `400 no_suitable_machines`, `400 serverless_gpu_unavailable`, `429 grid_quota_exceeded`, `403 serverless_disabled`, `503 github_not_configured`, `404 github_installation_not_found`, `404 github_repo_not_found`, `502 upstream_github`, `404 github_branch_not_found`, `409 app_config_unavailable`.

## `update_app`

Update the name, alerts, configuration or repository settings of an app. A running app is redeployed with the new configuration; while a GitHub-sourced app is still building, the change is applied by that build. Changing instances, hardware or volumes also needs compute:spend.

**Group:** `apps` · **Behavior:** Write

**Compact tool:** `apps_write` · **Action:** `update_app`

**MCP annotations:** `readOnlyHint: false` · `destructiveHint: true` · `idempotentHint: true` · `openWorldHint: true`

### Permissions and REST equivalents

| Operation     | REST                                                                                 | Required scopes |
| ------------- | ------------------------------------------------------------------------------------ | --------------- |
| `apps.update` | `PATCH /projects/{projectId}/apps/{appId}`                                           | `apps:write`    |
| Conditional   | instances, hardware or volumes change                                                | `compute:spend` |
| Conditional   | source changes what is built (branch, contextDir, dockerfilePath, dockerfileContent) | `compute:spend` |

### Arguments

| Argument    | Type     | Required | Description                                                                                                                                             |
| ----------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`      | `string` | No       | New app name                                                                                                                                            |
| `alerts`    | `object` | No       | Health-check email alerts                                                                                                                               |
| `config`    | `object` | No       | Configuration changes; list fields replace the stored list, object fields merge per key                                                                 |
| `source`    | `object` | No       | Repository settings of a GitHub-sourced app (members of the project's organization); a change to the branch, directories or Dockerfile starts a rebuild |
| `projectId` | `string` | Yes      | Project id                                                                                                                                              |
| `appId`     | `string` | Yes      | App id                                                                                                                                                  |

<details>

<summary>Complete input schema</summary>

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "New app name"
    },
    "alerts": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Send an email when the app is unhealthy"
        },
        "emails": {
          "maxItems": 10,
          "type": "array",
          "items": {
            "type": "string",
            "format": "email",
            "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
          },
          "description": "Recipients"
        },
        "delayMinutes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 30,
          "description": "Minutes the app must stay unhealthy before an email"
        }
      },
      "required": [
        "enabled",
        "emails",
        "delayMinutes"
      ],
      "additionalProperties": false,
      "description": "Health-check email alerts"
    },
    "config": {
      "type": "object",
      "properties": {
        "image": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "description": "Container image reference, e.g. nginx:1.27 or ghcr.io/org/app:tag"
        },
        "registryAuth": {
          "type": "object",
          "properties": {
            "username": {
              "type": "string",
              "minLength": 1,
              "description": "Registry login"
            },
            "password": {
              "type": "string",
              "minLength": 1,
              "description": "Registry password or token (write-only)"
            }
          },
          "required": [
            "username",
            "password"
          ],
          "additionalProperties": false,
          "description": "Credentials for a private image"
        },
        "ports": {
          "maxItems": 32,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "port": {
                "type": "integer",
                "minimum": 1,
                "maximum": 65535,
                "description": "Container port"
              },
              "protocol": {
                "type": "string",
                "enum": [
                  "tcp",
                  "udp",
                  "tcp_load_balancer",
                  "tcps_load_balancer",
                  "http_load_balancer",
                  "https_load_balancer",
                  "http80_load_balancer",
                  "https443_load_balancer",
                  "grpcs_load_balancer"
                ],
                "description": "How the port is exposed"
              }
            },
            "required": [
              "port",
              "protocol"
            ],
            "additionalProperties": {}
          },
          "description": "Ports to expose"
        },
        "env": {
          "maxItems": 200,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string",
                "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
                "description": "Variable name"
              },
              "value": {
                "description": "Value; null keeps the stored value of an existing variable",
                "type": [
                  "string",
                  "null"
                ]
              },
              "secret": {
                "type": "boolean",
                "description": "Store as a secret: never returned by reads"
              }
            },
            "required": [
              "key",
              "value"
            ],
            "additionalProperties": {}
          },
          "description": "Environment variables"
        },
        "command": {
          "maxItems": 256,
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Container command (CMD) override"
        },
        "entrypoint": {
          "maxItems": 256,
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Container entrypoint override"
        },
        "startupCommand": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "args": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Command and arguments"
                },
                "user": {
                  "type": "string",
                  "description": "User to run as"
                },
                "timeoutSec": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991,
                  "description": "Seconds before the command is considered failed"
                },
                "startPeriodSec": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991,
                  "description": "Seconds to wait after the container starts"
                }
              },
              "required": [
                "args"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ],
          "description": "Command run inside the container once it starts; null clears it"
        },
        "healthcheck": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "test": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Command that must exit 0 for the app to count as healthy"
                },
                "intervalSec": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 9007199254740991,
                  "description": "Seconds between checks"
                }
              },
              "required": [
                "test",
                "intervalSec"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ],
          "description": "Container health check; null clears it"
        },
        "restartPolicy": {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "disabled",
                "always",
                "on_failure",
                "task_completion"
              ],
              "description": "When to restart a container that exits"
            },
            "startTimeoutSec": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Seconds a start may take before it counts as failed"
            },
            "maxRetriesPerNode": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Restarts allowed on one server before moving on"
            },
            "maxErrorTolerance": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Failures tolerated before the app is stopped"
            },
            "numTasks": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "For task_completion: runs to complete before stopping"
            }
          },
          "required": [
            "mode"
          ],
          "additionalProperties": false,
          "description": "Restart behaviour"
        },
        "instances": {
          "type": "object",
          "properties": {
            "min": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Instances to keep running"
            },
            "max": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Upper bound for scaling"
            }
          },
          "required": [
            "min",
            "max"
          ],
          "additionalProperties": false,
          "description": "Instance count range"
        },
        "stateful": {
          "type": "boolean",
          "description": "Keep each instance pinned to its server and disk"
        },
        "hardware": {
          "type": "object",
          "properties": {
            "gpuCount": {
              "type": "integer",
              "minimum": 0,
              "maximum": 16,
              "description": "GPUs per instance; 0 for CPU-only. Above 0 needs grids.ids: serverless placement is CPU-only"
            },
            "gpuModels": {
              "maxItems": 16,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              },
              "description": "Acceptable GPU models, e.g. H100; empty means any"
            },
            "gpuManufacturer": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "amd",
                    "apple",
                    "intel",
                    "nvidia",
                    "xilinx"
                  ]
                },
                {
                  "type": "null"
                }
              ],
              "description": "GPU vendor; null means any"
            },
            "gpuVramBytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Minimum VRAM per GPU, in bytes"
            },
            "ramBytes": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991,
              "description": "RAM per instance, in bytes"
            },
            "storageBytes": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991,
              "description": "Disk per instance, in bytes"
            },
            "shmemBytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "Shared memory (/dev/shm) size, in bytes"
            }
          },
          "additionalProperties": false,
          "description": "Hardware requirements per instance"
        },
        "placement": {
          "type": "object",
          "properties": {
            "regions": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "us-west",
                  "us-east",
                  "us-central",
                  "ca-west",
                  "ca-east",
                  "ca-central",
                  "eu-west",
                  "eu-north",
                  "eu-east",
                  "eu-south",
                  "eu-central",
                  "eu-south-east",
                  "ap-east",
                  "ap-south-east",
                  "ap-north-east",
                  "ap-south"
                ]
              },
              "description": "Kinesis regions to run in; empty means any"
            },
            "providers": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "csp": {
                    "type": "string",
                    "enum": [
                      "aws",
                      "azure",
                      "gcp",
                      "kinesis"
                    ],
                    "description": "Cloud provider"
                  },
                  "regions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "region": {
                          "type": "string",
                          "minLength": 1,
                          "description": "Provider region"
                        },
                        "zones": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Zones within the region; empty means any"
                        }
                      },
                      "required": [
                        "region",
                        "zones"
                      ],
                      "additionalProperties": false
                    },
                    "description": "Regions of the provider to allow"
                  }
                },
                "required": [
                  "csp",
                  "regions"
                ],
                "additionalProperties": false
              },
              "description": "Restrict placement to specific providers and regions"
            },
            "allowedIps": {
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Source IPs or CIDR ranges allowed to reach the app; empty means everyone"
            }
          },
          "additionalProperties": false,
          "description": "Where the app may run and who may reach it"
        },
        "grids": {
          "type": "object",
          "properties": {
            "ids": {
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              },
              "description": "Grids to run on; empty means serverless (CPU-only), so a GPU app names at least one"
            },
            "priorities": {
              "propertyNames": {
                "type": "string"
              },
              "description": "Priority per grid id, -100 to 100",
              "type": "object",
              "properties": {},
              "additionalProperties": {
                "type": "integer",
                "minimum": -100,
                "maximum": 100
              }
            }
          },
          "additionalProperties": false,
          "description": "Run on grids instead of serverless capacity (members only, on grids they may deploy to)"
        },
        "volumes": {
          "maxItems": 4,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{1,63}$",
                "description": "Volume name, unique within the app"
              },
              "target": {
                "type": "string",
                "pattern": "^\\/.+",
                "description": "Absolute mount path inside the container"
              },
              "declaredSizeBytes": {
                "type": "integer",
                "minimum": 0,
                "maximum": 17592186044416,
                "description": "Expected size, used for placement; 0 or omitted means unspecified"
              }
            },
            "required": [
              "name",
              "target"
            ],
            "additionalProperties": false
          },
          "description": "Persistent volumes"
        }
      },
      "additionalProperties": false,
      "description": "Configuration changes; list fields replace the stored list, object fields merge per key"
    },
    "source": {
      "type": "object",
      "properties": {
        "branch": {
          "type": "string",
          "minLength": 1,
          "maxLength": 255,
          "description": "Branch to build and follow; default: the repository's default branch"
        },
        "contextDir": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "description": "Directory the image is built from, relative to the repository root (default /)"
        },
        "dockerfilePath": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "description": "Dockerfile path relative to contextDir (default Dockerfile)"
        },
        "autoDeploy": {
          "type": "boolean",
          "description": "Rebuild and redeploy on every push to the branch (default true)"
        },
        "dockerfileContent": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 65536
            },
            {
              "type": "null"
            }
          ],
          "description": "Inline Dockerfile used instead of dockerfilePath; null goes back to the file in the repository"
        }
      },
      "additionalProperties": false,
      "description": "Repository settings of a GitHub-sourced app (members of the project's organization); a change to the branch, directories or Dockerfile starts a rebuild"
    },
    "projectId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{24}$",
      "description": "Project id"
    },
    "appId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{24}$",
      "description": "App id"
    }
  },
  "required": [
    "projectId",
    "appId"
  ],
  "additionalProperties": false
}
```

</details>

<details>

<summary>OpenAI profile input schema</summary>

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "New app name"
    },
    "alerts": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Send an email when the app is unhealthy"
        },
        "emails": {
          "maxItems": 10,
          "type": "array",
          "items": {
            "type": "string",
            "format": "email",
            "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
          },
          "description": "Recipients"
        },
        "delayMinutes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 30,
          "description": "Minutes the app must stay unhealthy before an email"
        }
      },
      "required": [
        "enabled",
        "emails",
        "delayMinutes"
      ],
      "additionalProperties": false,
      "description": "Health-check email alerts"
    },
    "config": {
      "type": "object",
      "description": "The same fields as create_app's config; list fields replace the stored list, object fields merge per key"
    },
    "source": {
      "type": "object",
      "properties": {
        "branch": {
          "type": "string",
          "minLength": 1,
          "maxLength": 255,
          "description": "Branch to build and follow; default: the repository's default branch"
        },
        "contextDir": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "description": "Directory the image is built from, relative to the repository root (default /)"
        },
        "dockerfilePath": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "description": "Dockerfile path relative to contextDir (default Dockerfile)"
        },
        "autoDeploy": {
          "type": "boolean",
          "description": "Rebuild and redeploy on every push to the branch (default true)"
        },
        "dockerfileContent": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 65536
            },
            {
              "type": "null"
            }
          ],
          "description": "Inline Dockerfile used instead of dockerfilePath; null goes back to the file in the repository"
        }
      },
      "additionalProperties": false,
      "description": "Repository settings of a GitHub-sourced app (members of the project's organization); a change to the branch, directories or Dockerfile starts a rebuild"
    },
    "projectId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{24}$",
      "description": "Project id"
    },
    "appId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{24}$",
      "description": "App id"
    }
  },
  "required": [
    "projectId",
    "appId"
  ],
  "additionalProperties": false
}
```

</details>

### Result

* `id` (`string`): App id
* `projectId` (`string`): See the complete response schema below.
* `name` (`string`): See the complete response schema below.
* `guid` (`string`): Runtime identifier of the app
* `source` (`string or null`): Where the image comes from: Docker Hub, a registry link, GitHub or an upload
* `image` (`string or null`): See the complete response schema below.
* `domain` (`string or null`): Hostname the app answers on: the default custom domain, else the Kinesis-issued one
* `buildState` (`string or null`): Build pipeline state for GitHub-sourced apps
* `access` (`object`): See the complete response schema below.
* `createdBy` (`object or null`): Who created it. Null when nobody is on record, for another organization's, and for a credential without members:read
* `createdAt` (`string`): ISO 8601 timestamp (UTC)
* `status` (`object`): Status as last cached; use the status endpoint for a live read
* `config` (`object or null`): See the complete response schema below.
* `github` (`object or null`): Repository settings of a GitHub-sourced app
* `defaultDomain` (`string or null`): Custom domain shown as the app's address in the dashboard; null for the Kinesis-issued one
* `buildId` (`string or null`): Build started by a source change; null when nothing was rebuilt

<details>

<summary>Response schema: apps.update</summary>

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "App id"
    },
    "projectId": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "guid": {
      "type": "string",
      "description": "Runtime identifier of the app"
    },
    "source": {
      "description": "Where the image comes from: Docker Hub, a registry link, GitHub or an upload",
      "type": [
        "string",
        "null"
      ]
    },
    "image": {
      "type": [
        "string",
        "null"
      ]
    },
    "domain": {
      "description": "Hostname the app answers on: the default custom domain, else the Kinesis-issued one",
      "type": [
        "string",
        "null"
      ]
    },
    "buildState": {
      "description": "Build pipeline state for GitHub-sourced apps",
      "type": [
        "string",
        "null"
      ]
    },
    "access": {
      "type": "object",
      "properties": {
        "role": {
          "type": "string",
          "enum": [
            "admin",
            "developer",
            "viewer"
          ],
          "description": "The caller's role on it"
        },
        "outside": {
          "type": "boolean",
          "description": "Shared with the caller from another organization"
        },
        "isCreator": {
          "type": "boolean",
          "description": "The caller created it"
        }
      },
      "required": [
        "role",
        "outside",
        "isCreator"
      ],
      "additionalProperties": false
    },
    "createdBy": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "userId": {
              "type": "string",
              "description": "User id, as members.list and the sharing calls use it"
            },
            "name": {
              "type": [
                "string",
                "null"
              ]
            },
            "email": {
              "type": "string"
            }
          },
          "required": [
            "userId",
            "name",
            "email"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ],
      "description": "Who created it. Null when nobody is on record, for another organization's, and for a credential without members:read"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 timestamp (UTC)"
    },
    "status": {
      "type": "object",
      "properties": {
        "state": {
          "type": "string",
          "enum": [
            "unknown",
            "running",
            "stopped",
            "starting",
            "stopping",
            "scaling",
            "updating",
            "downloading",
            "provisioning",
            "start_blocked",
            "error",
            "building",
            "build_failed"
          ],
          "description": "Aggregate state; build states win while there is no runnable image"
        },
        "targetState": {
          "type": "string",
          "enum": [
            "running",
            "stopped",
            "unknown"
          ],
          "description": "What the runtime was last asked for; unknown until it has been asked, as for a repository app before its first build succeeds"
        },
        "nodes": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "address": {
                "type": "string"
              },
              "state": {
                "type": "string"
              },
              "reportedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "description": "ISO 8601 timestamp (UTC)"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "When the server last reported this state; not a start time"
              }
            },
            "required": [
              "address",
              "state",
              "reportedAt"
            ],
            "additionalProperties": false
          },
          "description": "Servers the app is placed on and the container state on each"
        },
        "endpoints": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "port": {
                "type": "integer",
                "description": "Container port, as in config.ports"
              },
              "protocol": {
                "type": "string",
                "description": "Protocol of that port, as in config.ports"
              },
              "address": {
                "description": "An http(s) URL for the HTTP protocols, host:port for the others; null until the endpoint is wired",
                "type": [
                  "string",
                  "null"
                ]
              },
              "server": {
                "description": "Server address of a direct tcp or udp endpoint; null when load-balanced",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "port",
              "protocol",
              "address",
              "server"
            ],
            "additionalProperties": false
          },
          "description": "Where each configured port answers; a load-balanced port gets its address a minute or two after the first start"
        },
        "errors": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "description": "ISO 8601 timestamp (UTC)"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "details": {
                "anyOf": [
                  {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Extra data the runtime attached, such as the grid or server involved"
              }
            },
            "required": [
              "type",
              "message",
              "at",
              "details"
            ],
            "additionalProperties": false
          },
          "description": "Recent runtime errors, newest first"
        },
        "workOrders": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "description": "What the runtime asked the server to do"
              },
              "server": {
                "type": "string",
                "description": "Server address"
              },
              "status": {
                "type": "string"
              },
              "createdAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "description": "ISO 8601 timestamp (UTC)"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "startedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "description": "ISO 8601 timestamp (UTC)"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "completedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "description": "ISO 8601 timestamp (UTC)"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "type",
              "server",
              "status",
              "createdAt",
              "startedAt",
              "completedAt"
            ],
            "additionalProperties": false
          },
          "description": "The runtime's latest instructions to servers, newest first; an order that never completes is the stall"
        },
        "grid": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "fill": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "target": {
                          "type": "integer",
                          "description": "Members the grid is composed to have"
                        },
                        "online": {
                          "type": "integer",
                          "description": "Members the app runs on"
                        },
                        "pending": {
                          "type": "integer"
                        },
                        "converging": {
                          "type": "boolean",
                          "description": "The grid is still acquiring members or placing the app"
                        }
                      },
                      "required": [
                        "target",
                        "online",
                        "pending",
                        "converging"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "How far the grid has filled for this app"
                },
                "idleReclaim": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "gridId": {
                        "type": "string"
                      },
                      "warnedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "description": "ISO 8601 timestamp (UTC)"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "evictAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "description": "ISO 8601 timestamp (UTC)"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "When the app becomes evictable; null when the grid only warns"
                      },
                      "evictedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "description": "ISO 8601 timestamp (UTC)"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "cooldownEndsAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "description": "ISO 8601 timestamp (UTC)"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "When the grid takes the app again after an eviction"
                      },
                      "evidence": {
                        "type": "string",
                        "description": "Why the grid considers the app idle"
                      }
                    },
                    "required": [
                      "gridId",
                      "warnedAt",
                      "evictAt",
                      "evictedAt",
                      "cooldownEndsAt",
                      "evidence"
                    ],
                    "additionalProperties": false
                  },
                  "description": "Grids whose idle policy has warned or evicted the app"
                },
                "queue": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "gridId": {
                        "type": "string"
                      },
                      "position": {
                        "type": "integer",
                        "description": "1-based place in the grid's fair-share queue"
                      },
                      "queueLength": {
                        "type": "integer"
                      },
                      "enqueuedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "description": "ISO 8601 timestamp (UTC)"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "held": {
                        "type": "boolean",
                        "description": "The scheduler keeps the app off the grid until its turn comes"
                      }
                    },
                    "required": [
                      "gridId",
                      "position",
                      "queueLength",
                      "enqueuedAt",
                      "held"
                    ],
                    "additionalProperties": false
                  },
                  "description": "Full grids the app is queued on"
                }
              },
              "required": [
                "fill",
                "idleReclaim",
                "queue"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ],
          "description": "Grid placement details; null for a serverless app"
        },
        "pollAfterSec": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Seconds to wait before reading the status again while it is changing; null in a settled state"
        }
      },
      "required": [
        "state",
        "targetState",
        "nodes",
        "endpoints",
        "errors",
        "workOrders",
        "grid",
        "pollAfterSec"
      ],
      "additionalProperties": false,
      "description": "Status as last cached; use the status endpoint for a live read"
    },
    "config": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "image": {
              "type": "string",
              "description": "Container image reference"
            },
            "imageTag": {
              "description": "Tag, kept separately for Docker Hub images",
              "type": [
                "string",
                "null"
              ]
            },
            "registryUsername": {
              "description": "Registry login; the password is write-only",
              "type": [
                "string",
                "null"
              ]
            },
            "ports": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "port": {
                    "type": "integer"
                  },
                  "protocol": {
                    "type": "string"
                  }
                },
                "required": [
                  "port",
                  "protocol"
                ],
                "additionalProperties": false
              }
            },
            "env": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string"
                  },
                  "value": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "secret": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "key",
                  "value",
                  "secret"
                ],
                "additionalProperties": false
              },
              "description": "Environment variables; value is null for secrets, and on a connection that takes no credentials for values that look like one (null keeps a value on update)"
            },
            "command": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "entrypoint": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "startupCommand": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "args": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "user": {
                      "type": "string"
                    },
                    "timeoutSec": {
                      "type": "number"
                    },
                    "startPeriodSec": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "args",
                    "user",
                    "timeoutSec",
                    "startPeriodSec"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "healthcheck": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "test": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "intervalSec": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "test",
                    "intervalSec"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "restartPolicy": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string"
                    },
                    "startTimeoutSec": {
                      "type": "number"
                    },
                    "maxRetriesPerNode": {
                      "type": "number"
                    },
                    "maxErrorTolerance": {
                      "type": "number"
                    },
                    "numTasks": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "mode",
                    "startTimeoutSec",
                    "maxRetriesPerNode",
                    "maxErrorTolerance",
                    "numTasks"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "instances": {
              "type": "object",
              "properties": {
                "min": {
                  "type": "integer"
                },
                "max": {
                  "type": "integer"
                }
              },
              "required": [
                "min",
                "max"
              ],
              "additionalProperties": false
            },
            "stateful": {
              "type": "boolean"
            },
            "hardware": {
              "type": "object",
              "properties": {
                "gpuCount": {
                  "type": "integer"
                },
                "gpuModels": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "gpuManufacturer": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "gpuVramBytes": {
                  "type": "number"
                },
                "ramBytes": {
                  "type": "number"
                },
                "storageBytes": {
                  "type": "number"
                },
                "shmemBytes": {
                  "type": "number"
                }
              },
              "required": [
                "gpuCount",
                "gpuModels",
                "gpuManufacturer",
                "gpuVramBytes",
                "ramBytes",
                "storageBytes",
                "shmemBytes"
              ],
              "additionalProperties": false
            },
            "placement": {
              "type": "object",
              "properties": {
                "regions": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Kinesis regions, e.g. us-west"
                },
                "providers": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "csp": {
                        "type": "string"
                      },
                      "regions": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "region": {
                              "type": "string"
                            },
                            "zones": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "region",
                            "zones"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "csp",
                      "regions"
                    ],
                    "additionalProperties": false
                  }
                },
                "allowedIps": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Source IPs or CIDR ranges allowed to reach the app"
                }
              },
              "required": [
                "regions",
                "providers",
                "allowedIps"
              ],
              "additionalProperties": false
            },
            "grids": {
              "type": "object",
              "properties": {
                "ids": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "priorities": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "number"
                  },
                  "description": "Priority per grid id"
                }
              },
              "required": [
                "ids",
                "priorities"
              ],
              "additionalProperties": false
            },
            "volumes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "target": {
                    "type": "string"
                  },
                  "declaredSizeBytes": {
                    "type": "number"
                  }
                },
                "required": [
                  "name",
                  "target",
                  "declaredSizeBytes"
                ],
                "additionalProperties": false
              }
            },
            "domains": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Custom domains attached to the app (see the domain operations)"
            }
          },
          "required": [
            "image",
            "imageTag",
            "registryUsername",
            "ports",
            "env",
            "command",
            "entrypoint",
            "startupCommand",
            "healthcheck",
            "restartPolicy",
            "instances",
            "stateful",
            "hardware",
            "placement",
            "grids",
            "volumes",
            "domains"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "github": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "installationId": {
              "type": "integer",
              "description": "GitHub App installation the repository is read through"
            },
            "repo": {
              "type": "string",
              "description": "owner/name"
            },
            "url": {
              "type": "string"
            },
            "branch": {
              "type": "string",
              "description": "Branch that is built and, with autoDeploy, followed"
            },
            "contextDir": {
              "type": "string"
            },
            "dockerfilePath": {
              "description": "Dockerfile path relative to contextDir; not used while dockerfileContent is set",
              "type": [
                "string",
                "null"
              ]
            },
            "dockerfileOverride": {
              "type": "boolean",
              "description": "An inline Dockerfile (dockerfileContent) is built instead of dockerfilePath"
            },
            "dockerfileContent": {
              "description": "The inline Dockerfile that is built; null when the repository's own file is used",
              "type": [
                "string",
                "null"
              ]
            },
            "autoDeploy": {
              "type": "boolean",
              "description": "Every push to the branch rebuilds and redeploys"
            },
            "clonedFrom": {
              "description": "Public repository (owner/name) the app's repository was copied from at creation; null otherwise",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "installationId",
            "repo",
            "url",
            "branch",
            "contextDir",
            "dockerfilePath",
            "dockerfileOverride",
            "dockerfileContent",
            "autoDeploy",
            "clonedFrom"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ],
      "description": "Repository settings of a GitHub-sourced app"
    },
    "defaultDomain": {
      "description": "Custom domain shown as the app's address in the dashboard; null for the Kinesis-issued one",
      "type": [
        "string",
        "null"
      ]
    },
    "buildId": {
      "description": "Build started by a source change; null when nothing was rebuilt",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "id",
    "projectId",
    "name",
    "guid",
    "source",
    "image",
    "domain",
    "buildState",
    "access",
    "createdBy",
    "createdAt",
    "status",
    "config",
    "github",
    "defaultDomain",
    "buildId"
  ],
  "additionalProperties": false
}
```

</details>

Operation-specific errors: `409 app_source_unsupported`, `400 grid_to_serverless`, `400 no_suitable_machines`, `400 serverless_gpu_unavailable`, `429 grid_quota_exceeded`, `403 serverless_disabled`.

## `move_app`

Move an app to another project of its organization. Admins may, and so may the app's creator. Nothing about the app itself changes.

**Group:** `apps` · **Behavior:** Write

**Compact tool:** `apps_write` · **Action:** `move_app`

**MCP annotations:** `readOnlyHint: false` · `destructiveHint: true` · `idempotentHint: true` · `openWorldHint: false`

### Permissions and REST equivalents

| Operation   | REST                                           | Required scopes |
| ----------- | ---------------------------------------------- | --------------- |
| `apps.move` | `POST /projects/{projectId}/apps/{appId}/move` | `apps:admin`    |

### Arguments

| Argument          | Type     | Required | Description                  |
| ----------------- | -------- | -------- | ---------------------------- |
| `targetProjectId` | `string` | Yes      | Project to move the app into |
| `projectId`       | `string` | Yes      | Project id                   |
| `appId`           | `string` | Yes      | App id                       |

<details>

<summary>Complete input schema</summary>

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "targetProjectId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{24}$",
      "description": "Project to move the app into"
    },
    "projectId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{24}$",
      "description": "Project id"
    },
    "appId": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{24}$",
      "description": "App id"
    }
  },
  "required": [
    "targetProjectId",
    "projectId",
    "appId"
  ],
  "additionalProperties": false
}
```

</details>

### Result

* `id` (`string`): App id
* `projectId` (`string`): See the complete response schema below.
* `name` (`string`): See the complete response schema below.
* `guid` (`string`): Runtime identifier of the app
* `source` (`string or null`): Where the image comes from: Docker Hub, a registry link, GitHub or an upload
* `image` (`string or null`): See the complete response schema below.
* `domain` (`string or null`): Hostname the app answers on: the default custom domain, else the Kinesis-issued one
* `buildState` (`string or null`): Build pipeline state for GitHub-sourced apps
* `access` (`object`): See the complete response schema below.
* `createdBy` (`object or null`): Who created it. Null when nobody is on record, for another organization's, and for a credential without members:read
* `createdAt` (`string`): ISO 8601 timestamp (UTC)

<details>

<summary>Response schema: apps.move</summary>

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "App id"
    },
    "projectId": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "guid": {
      "type": "string",
      "description": "Runtime identifier of the app"
    },
    "source": {
      "description": "Where the image comes from: Docker Hub, a registry link, GitHub or an upload",
      "type": [
        "string",
        "null"
      ]
    },
    "image": {
      "type": [
        "string",
        "null"
      ]
    },
    "domain": {
      "description": "Hostname the app answers on: the default custom domain, else the Kinesis-issued one",
      "type": [
        "string",
        "null"
      ]
    },
    "buildState": {
      "description": "Build pipeline state for GitHub-sourced apps",
      "type": [
        "string",
        "null"
      ]
    },
    "access": {
      "type": "object",
      "properties": {
        "role": {
          "type": "string",
          "enum": [
            "admin",
            "developer",
            "viewer"
          ],
          "description": "The caller's role on it"
        },
        "outside": {
          "type": "boolean",
          "description": "Shared with the caller from another organization"
        },
        "isCreator": {
          "type": "boolean",
          "description": "The caller created it"
        }
      },
      "required": [
        "role",
        "outside",
        "isCreator"
      ],
      "additionalProperties": false
    },
    "createdBy": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "userId": {
              "type": "string",
              "description": "User id, as members.list and the sharing calls use it"
            },
            "name": {
              "type": [
                "string",
                "null"
              ]
            },
            "email": {
              "type": "string"
            }
          },
          "required": [
            "userId",
            "name",
            "email"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ],
      "description": "Who created it. Null when nobody is on record, for another organization's, and for a credential without members:read"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 timestamp (UTC)"
    }
  },
  "required": [
    "id",
    "projectId",
    "name",
    "guid",
    "source",
    "image",
    "domain",
    "buildState",
    "access",
    "createdBy",
    "createdAt"
  ],
  "additionalProperties": false
}
```

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.kinesis.network/mcp/tools/apps.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
