READ

get_environment_status

Answers what runs on one environment and how it got there; the environment with its version, health and freeze, the deployment that put the running version there, and the last few deployments into it.

Read one environment before acting on it. Give environment_id; the answer carries environment (the record get_environment answers, with current_version, health, frozen, protected and current_deployment_id), current_deployment (the deployment that put the running version there, or null when none succeeded yet) and recent_deployments (the last five into it, the newest first, as list_deployments lists them). Read it to say what is live, to see whether a deployment is still queued or running before starting another, and to notice a freeze or a protected environment before a pipeline is pointed at it. The deployments are staff's: a guest token reads the environment and is refused the rest. It needs environment:view, and deployment:view-any for the deployments.

Requires ability

The token behind the MCP session must hold it, or the call is refused with TOKEN_MISSING_ABILITY.

Annotations

Read-only

It reads and never changes anything.

Arguments

environment_id*string

UUID of the environment.

What it returns

{  "data": {    "environment": {      "id": "e5f6a7b8-c9d0-4e1f-8a2b-3c4d5e6f7081",      "project_id": "7f3d1c92-8b45-4e6a-9d21-5c8e0a4b6f13",      "component_id": "d4e5f6a7-b8c9-4d0e-9f1a-2b3c4d5e6f70",      "name": "Staging",      "kind": "staging",      "url": "https://staging.example.test",      "api_url": "https://api.staging.example.test",      "admin_url": "https://staging.example.test/admin",      "branch": "main",      "hosting": "Managed containers",      "region": "Singapore",      "auto_deploy": true,      "protected": false,      "health": "healthy",      "health_check_url": "https://staging.example.test/up",      "last_checked_at": "2026-11-03T10:20:00+00:00",      "consecutive_failures": 0,      "current_version": "1.4.0",      "current_deployment_id": "6a7b8c9d-0e1f-4a2b-9c3d-4e5f6a7b8c9d",      "frozen_until": null,      "frozen": false,      "notes": null,      "position": 2,      "created_at": "2026-10-20T09:05:00+00:00",      "updated_at": "2026-11-03T10:15:30+00:00"    },    "current_deployment": {      "id": "6a7b8c9d-0e1f-4a2b-9c3d-4e5f6a7b8c9d",      "project_id": "7f3d1c92-8b45-4e6a-9d21-5c8e0a4b6f13",      "component_id": "d4e5f6a7-b8c9-4d0e-9f1a-2b3c4d5e6f70",      "environment_id": "e5f6a7b8-c9d0-4e1f-8a2b-3c4d5e6f7081",      "release_id": null,      "version": "1.4.0",      "commit_sha": "a1b2c3d4e5f60718293a4b5c6d7e8f9012345678",      "branch": "main",      "status": "succeeded",      "source": "ci",      "triggered_by": "3f8a1c2e-7b4d-4e5f-9a6b-1c2d3e4f5a6b",      "external_id": null,      "pipeline_url": "https://ci.example.test/runs/4821",      "started_at": "2026-11-03T10:12:00+00:00",      "finished_at": "2026-11-03T10:15:30+00:00",      "duration_seconds": 210,      "notes": null,      "rollback_of_id": null,      "created_at": "2026-11-03T10:12:00+00:00",      "updated_at": "2026-11-03T10:15:30+00:00"    },    "recent_deployments": []  }}

How it fails

RESOURCE_NOT_FOUND

unknown environment_id, an environment of another tenant, or one a guest token may not see.

FORBIDDEN

the token is a client guest's, or the holder may not read the project's deployments.

TOKEN_MISSING_ABILITY

token lacks environment:view.

How is this guide?

Last updated on