Skip to main content
Glama

Create destructive repository commit

create_destructive_commit
Destructive

Create a GitLab commit that deletes files or force-updates a branch. Requires a reviewed start_sha; delete actions also need last_commit_id to prevent overwriting concurrent changes.

Instructions

Create one GitLab commit that can delete files or force a branch update. For ordinary updates, the branch tip must match start_sha before the commit is submitted; forced updates use start_sha as GitLab's explicit replacement parent. Delete actions also require last_commit_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNoAllow GitLab to force the branch update. Use only after explicitly reviewing the target ref.
branchYes
actionsYes
projectYesGitLab project ID or full path such as group/project.
start_shaYesReviewed commit SHA from which GitLab must apply this destructive change.
author_nameNo
author_emailNo
commit_messageYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYesCreated destructive GitLab commit, including its commit ID, SHA, and affected file actions when GitLab returns them.
Behavior4/5

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

The description adds behavioral nuance beyond the annotations: it explains the role of start_sha in both ordinary (branch tip match) and forced updates, and that delete actions require last_commit_id. It aligns with destructiveHint=true and does not contradict annotations. While annotations already signal destructiveness, the description enriches understanding with preconditions and semantics.

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?

The description is two sentences, front-loaded with the core purpose, and contains no extraneous information. It efficiently conveys the critical constraints and conditions without verbosity.

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

Completeness2/5

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

Despite the complex schema (8 params, nested actions array, 5 action types), the description only mentions delete and force branch updates. It omits that the tool can also create, update, move, and chmod files (as per schema), potentially misleading an agent to think it is exclusively destructive. It also does not explain the actions array structure or other parameters. Given the low schema coverage, this is a significant completeness gap.

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?

The description clarifies the purpose of start_sha (must match branch tip for ordinary updates, replacement parent for forced) and last_commit_id (required for deletes), adding meaning beyond the schema. However, schema description coverage is only 38%, and the description does not compensate for many parameters (project, branch, commit_message, actions array structure, force bool). It adds some value but leaves significant gaps.

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?

The description clearly states the tool's purpose: 'Create one GitLab commit that can delete files or force a branch update.' It uses a specific verb and resource (create commit) and explicitly scopes it to destructive operations, distinguishing it from sibling tools like create_commit (normal commits) and individual file tools like update_file/delete_file.

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

Usage Guidelines4/5

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

The description provides clear context on when to use this tool: for deleting files or forcing branch updates. It explains conditions for ordinary updates (branch tip must match start_sha) and forced updates (start_sha as replacement parent). However, it does not explicitly mention alternatives like create_commit for non-destructive changes or state when NOT to use this tool, so it stops short of full guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/CobolJunkie/gitlab-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server