Skip to main content
Glama

Create Environment

environment_create
Idempotent

Adds 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

NameRequiredDescriptionDefault
cpuNoCPU per instance, for example `1`. Limited by the plan.
nameNoThe display name of the environment.
typeYes`development` or `staging`.
app_idYesThe app this call works on: its `app_id` uuid from `apps_list`.
memoryNoMemory per instance, for example `512Mi`. Limited by the plan.
concurrencyNoRequests one instance serves at the same time.
max_instancesNoThe most instances the environment scales out to. Limited by the plan.
organization_idNoAn 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_commandNoThe command a deploy runs once before the new version takes traffic, for example `npx prisma migrate deploy`. Up to 1000 characters.
timeout_secondsNoHow long a request may run before it is cut off.
healthcheck_pathNoThe path a deploy checks for an HTTP 200, for example `/health`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly=false and idempotent=true; the description substantiates the idempotency with the concrete dedupe behavior ('returned unchanged with `created: false`') and adds what the annotations cannot: the environment inherits the app's region, gets a Meridian hostname, can scale to zero, and has no deployment yet. It also discloses the refusal error code and that compute values are bounded by the app's plan, which is meaningful behavioral context beyond the annotation set.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Structure is strong: purpose first, then creation semantics, then refusal/duplicate behavior, then return shape. It is longer than most descriptions, but nearly every sentence carries decision-relevant information (plan limits, dedupe, auto_deploy side effect). Slight deduction for density — the auto_deploy paragraph and the settings inventory could be tightened without losing meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter mutation tool with no output schema, the description covers what an agent must know: required inputs, what optional inputs do, side effects on push deployments, failure mode, duplicate handling, and the return shape ('`created` and the environment in the shape of one `environments_list` entry'). Nothing needed to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline would be 3, but the description adds real meaning: it classifies the trailing parameters as optional starting settings that can be changed later with `environment_update`, notes compute values are limited by the plan, and reveals a non-obvious interaction the schema cannot express — starting settings are silently ignored when an environment of that type already exists. That is exactly the kind of semantic guidance a caller needs before setting values.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource ('Adds a `development` or `staging` environment to an app') and immediately delimits scope by stating that the production environment exists from app creation and is never created here. It also names concrete siblings (`apps_list` for the app_id, `deployment_create` for the follow-up step, `environment_update` for later edits), so an agent can place it in the workflow without opening other schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit about when to call (add a dev/staging env), when the call fails (`USAGE_LIMIT_EXCEEDED` if the plan lacks another environment of that type), and what happens on a duplicate (returned unchanged with `created: false`). It also directs the agent to `deployment_create` as the next step and to `environments_list` to verify `auto_deploy`, which is genuine routing guidance rather than a restatement.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources