Skip to main content
Glama

Delete repository file

delete_file
Destructive

Delete a file in a GitLab repository and commit the removal. Requires the last commit ID to guard against conflicts and ensure safe deletion.

Instructions

Delete a repository file and commit the deletion. Supply last_commit_id to guard against concurrent edits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
branchYes
projectYesGitLab project ID or full path such as group/project.
author_nameNo
author_emailNo
start_branchNo
commit_messageYes
last_commit_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYesGitLab response normalized for model use.
Behavior4/5

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

Annotations already mark the tool as destructive and non-read-only. The description adds meaningful behavioral context by stating that the deletion is committed and that last_commit_id is used to guard against concurrent edits. There is no contradiction with annotations.

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 short, front-loaded sentences contain the core action and a key safety guard. There is no redundant or filler content.

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?

The description covers the central operation and concurrency guard, and the output schema reduces the need to describe return values. However, with eight parameters and low schema coverage, it leaves several required fields undefined semantically and does not relate the tool to create_file/update_file for selection context.

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 only 13%, so the description should compensate for the many undocumented parameters. It only explains last_commit_id, leaving path, branch, commit_message, author_name, and author_email without added semantics beyond the schema.

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 deletes a repository file and commits the deletion, which is a specific verb+resource pairing. It also distinguishes itself from sibling tools like create_file and update_file by focusing on deletion with an accompanying commit.

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

Usage Guidelines2/5

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

The description provides no explicit guidance on when to use this tool versus alternatives such as create_file or update_file. It only mentions supplying last_commit_id to guard against concurrent edits, which is a narrow usage hint rather than a broader selection guideline.

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