Create Environment
environment_createAdds a development or staging environment to an app, like Add
environment in the dashboard. Takes the app_id from apps_list and
the type. The production environment exists from the moment the app
is created, so it is never created here.
The environment is created in the app's region, with its own Meridian
hostname, and can scale to zero. It has no deployment yet: deploy to
it with deployment_create. Optional starting settings:
release_command, healthcheck_path, cpu, memory,
max_instances, concurrency, timeout_seconds, name (change
them later with environment_update). Compute values are limited by
the app's plan.
Refused when the app's plan does not include another environment of
that type (USAGE_LIMIT_EXCEEDED). When the app already has an
environment of that type, it is returned unchanged with
created: false, and the starting settings are ignored.
Check auto_deploy in the answer of environments_list afterwards:
an app whose pushes deployed to production because it had no
development environment deploys them to the new development
environment from now on.
Returns created and the environment in the shape of one
environments_list entry.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"app_id": "<app_id>",
"type": "<type>"
},
"name": "environment_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cpu | No | CPU per instance, for example `1`. Limited by the plan. | |
| name | No | The display name of the environment. | |
| type | Yes | `development` or `staging`. | |
| app_id | Yes | The app this call works on: its `app_id` uuid from `apps_list`. | |
| memory | No | Memory per instance, for example `512Mi`. Limited by the plan. | |
| concurrency | No | Requests one instance serves at the same time. | |
| max_instances | No | The most instances the environment scales out to. Limited by the plan. | |
| organization_id | No | An organisation uuid or slug. When supplied, `app_id` is resolved within that organisation and may be a slug instead of a uuid, mirroring the Meridian web app. | |
| release_command | No | The command a deploy runs once before the new version takes traffic, for example `npx prisma migrate deploy`. Up to 1000 characters. | |
| timeout_seconds | No | How long a request may run before it is cut off. | |
| healthcheck_path | No | The path a deploy checks for an HTTP 200, for example `/health`. |