---
title: "Create env"
description: "Provision a new Log10x environment on log10x.com via the backend API."
icon: material/plus-box-outline
---

Provision a new environment on your Log10x account. Pairs naturally with the install advisors: "create a staging env, then give me the Reporter install plan" runs as two tool calls with no console trip.

Not idempotent: the same name twice returns a friendly error before the round-trip.

## :material-code-braces: Example

!!! tenx-ask "You"

    create a staging env, make it default

!!! tenx-answer "Log10x"

    Created env `staging` (env_id `8c2b…`). Now the default. The previous default `prod` has been un-defaulted.

## :material-check-decagram-outline: Prerequisites

A Log10x account, see [Sign in](signin.md).

## :material-code-json: Schema and samples

??? tenx-input-example "Input example"

    Real call against the demo env (captured by [`scripts/capture-tool-envelopes.mjs`](https://github.com/log-10x/log10x-mcp/blob/main/scripts/capture-tool-envelopes.mjs)).

    ```json
    {
      "name": "staging",
      "is_default": false
    }
    ```

??? tenx-input-schema "Input schema"

    Agent-facing JSON Schema (the canonical shape the MCP server publishes via `tools/list`):

    ```json
    {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "description": "Display name for the new environment, e.g. \"staging\" or \"us-east-prod\"."
        },
        "is_default": {
          "type": "boolean",
          "description": "When true, the new env becomes the user's default, every tool call without an explicit `environment` arg routes here. The previous default is automatically un-defaulted by the backend. Defaults to false (new env is created but the existing default stays the default)."
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false
    }
    ```

    Source: [`src/tools/create-env.ts`](https://github.com/log-10x/log10x-mcp/blob/main/src/tools/create-env.ts).

??? tenx-output-example "Output example"

    Real envelope from the demo env. `view: "summary"` returns the full `StructuredOutput` with typed `data`. Long arrays + base64 PNG bodies trimmed for readability; the real call returns them in full.

    Headline (the 1-line agent-facing answer):

    > _Created env "staging" (env\_id 9e6f...c2, not new default)._

    ```json
    {
      "schema_version": "1.0",
      "schema_epoch": "2026-05-25",
      "tool": "log10x_create_env",
      "view": "summary",
      "summary": {
        "headline": "Created env \"staging\" (env_id 9e6f...c2, not new default)."
      },
      "data": {
        "ok": true,
        "name": "staging",
        "env_id": "9e6f0a2b-...-c2",
        "permissions": "OWNER",
        "is_default": false,
        "total_envs": 2
      },
      "actions": [
        {
          "tool": "log10x_advise_install",
          "args": {
            "environment": "staging"
          },
          "reason": "pick the right Reporter / Receiver / Retriever install path for the new env"
        }
      ],
      "generated_at": "2026-05-26T00:00:00.000Z"
    }
    ```

??? tenx-output-schema "Output schema"

    The `data` block inside the [StructuredOutput envelope](../index.md#json-by-default-output):

    ```typescript
    interface ToolData {
      ok: boolean;
      name: string;
      env_id: string;
      permissions: string;
      is_default: boolean;
      total_envs: number;
    }
    ```

    Envelope-level fields the agent should also read: `summary.headline` (1-line answer), `actions[]` (next-call chain hints as `{tool, args, reason}`), `truncated: boolean`, `images[]` (PNG attachments where applicable), `schema_epoch` (engine-ID stability boundary).
