Skip to main content
Glama

Delete Environment

gitlab_delete_environment
Destructive

Permanently delete a stopped GitLab environment by environment ID. This irreversible action is for cleanup; verify with get and stop the environment first.

Instructions

Delete a stopped environment permanently. Irreversible. Requires environment_id. Recommended pre-check: gitlab_get_environment, then gitlab_stop_environment.

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": {
      "environment_id": "<environment_id>"
    },
    "name": "gitlab_delete_environment"
  }
}

Input Schema

NameRequiredDescriptionDefault
project_idNo
environment_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.7.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=false and readOnlyHint=false, so the safety profile is partly covered. The description still adds real value by emphasizing permanence/irreversibility and the requirement that the environment be stopped first. It does not mention that a repeat call on an already-deleted environment will fail (relevant given idempotentHint=false), which keeps it from a 5.

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?

Three short, front-loaded sentences: action, consequence, requirement, then the workflow hint. No filler, though the 'Recommended pre-check' clause is slightly compressed in a way that requires the reader to parse ordering.

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

Completeness3/5

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

For a destructive, no-output-schema tool the description covers the safety framing reasonably well against annotations. The gap is the unexplained project_id parameter in a tool whose API path is project-scoped, which is exactly the kind of detail the description should supply when the schema does not.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must carry parameter meaning and largely does not. It flags environment_id as required but gives no format or sourcing guidance, and project_id is never mentioned at all, leaving the agent to guess whether project_id is mandatory for the nested route.

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?

States a specific verb and resource (delete environment) plus a meaningful scope qualifier: only stopped environments, permanently. This distinguishes it clearly from gitlab_stop_environment and the other delete_* siblings operating on unrelated resources.

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?

Gives explicit prerequisites ('stopped environment') and an ordered recommended workflow: gitlab_get_environment first, then gitlab_stop_environment, then this tool. It names the alternatives an agent might otherwise pick and the condition that routes to them.

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

Deploy Server

Other Tools