Skip to main content
Glama

Stop Stale Environments

gitlab_stop_stale_environments
Destructive

Stop GitLab environments last modified or deployed before an ISO 8601 date to clean up stale environments without deleting them; protected environments are skipped.

Instructions

Stop every environment last modified or deployed before an ISO 8601 date (between 10 years and 1 week ago). GitLab skips protected environments; this stops but does not delete.

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": {
      "before": "<before>"
    },
    "name": "gitlab_stop_stale_environments"
  }
}

Input Schema

NameRequiredDescriptionDefault
beforeYes
project_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.7.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and openWorldHint=true, and the description adds meaningful context beyond them: protected environments are skipped, and the operation stops rather than deletes, which materially lowers the perceived blast radius of a destructive tool. It does not cover partial-failure behavior or how many environments a run may affect.

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

Conciseness5/5

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

Two tight sentences with no filler; the selection rule comes first and the safety caveats follow. Every clause carries operational information.

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 bulk mutation with no output schema and zero schema description coverage, the definition covers the date parameter and the stop-vs-delete distinction but leaves project_id and the returned result undocumented. An agent knows the intent but not the full scope of the call.

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

Parameters3/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 the load; it does well for 'before', specifying ISO 8601 format and a valid range of 10 years to 1 week ago, which the schema does not convey. However, 'project_id' is never mentioned, leaving it ambiguous whether omission means all projects or a default scope.

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 ('Stop every environment') plus the selection criterion ('last modified or deployed before an ISO 8601 date'), which implicitly distinguishes it from the singular gitlab_stop_environment sibling. An agent can tell what this does without opening the schema.

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

Usage Guidelines3/5

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

The description defines the qualifying condition for environments to be stopped and the allowed date window (10 years to 1 week ago), which implies a stale-environment cleanup use case. It never states when not to use it or names an alternative tool for single-environment or review-app cleanup, so routing remains inferred.

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