record_deployment
Records a deployment into one of a project's environments the way a pipeline reports one, succeeded unless told otherwise; a succeeded deployment tells the environment which version now runs there.
Put a deployment on record. Give project_id, environment_id (one of the project's, from list_environments) and version (a tag, a semantic version or a build number), and commit_sha, branch, pipeline_url, notes, started_at and finished_at when you know them. The status is succeeded when left out, so a deployment done by hand is recorded in one call; queued, running or failed record where things stand instead, and a deployment opened as running is finished by the pipeline over REST, not through this tool. A succeeded deployment writes the version and its own id onto the environment, and the record is written as the person the token acts as, with the source ci. The event for the status goes out, and a failed deployment, or one that reached production, tells the project's leads. The same record POST /v1/projects/{project}/deployments writes. It needs deployment:record; a client guest's token is refused.
Requires ability
The token behind the MCP session must hold it, or the call is refused with TOKEN_MISSING_ABILITY.
Arguments
project_id*stringUUID of the project.
environment_id*stringUUID of the environment deployed into; one of the project's.
version*stringThe version deployed, up to 60 characters: a tag, a semantic version or a build number.
statusstringoptionalWhere it stands as recorded; succeeded when left out.
queuedrunningsucceededfailedcommit_shastringoptionalThe commit deployed, 7 to 40 hex characters.
branchstringoptionalThe branch or tag deployed from.
pipeline_urlstringoptionalWhere the pipeline run can be read.
notesstringoptionalA note to keep with the record, up to 5,000 characters.
started_atstringoptionalWhen it started, ISO 8601; now when left out and past queued.
finished_atstringoptionalWhen it ended, ISO 8601; now when left out and final.
What it returns
{ "data": { "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", "environment_name": "Staging", "release_id": null, "version": "1.4.2", "commit_sha": "b2c3d4e5f60718293a4b5c6d7e8f9012345678a1", "branch": "main", "status": "succeeded", "source": "ci", "triggered_by": "3f8a1c2e-7b4d-4e5f-9a6b-1c2d3e4f5a6b", "external_id": null, "pipeline_url": null, "started_at": "2026-11-03T14:00:00+00:00", "finished_at": "2026-11-03T14:00:00+00:00", "duration_seconds": 0, "notes": "Deployed by hand after the hotfix.", "rollback_of_id": null, "created_at": "2026-11-03T14:00:00+00:00", "updated_at": "2026-11-03T14:00:00+00:00" }}How it fails
VALIDATION_FAILEDenvironment_id or version missing or malformed, status not queued, running, succeeded or failed, commit_sha not hex, or a date unreadable.
RESOURCE_NOT_FOUNDunknown project_id, or an environment_id that is not one of the project's environments.
FORBIDDENthe token is a client guest's, or the holder may not record the project's deployments.
TOKEN_MISSING_ABILITYtoken lacks deployment:record.
How is this guide?
Last updated on