Skip to main content
Glama

Delete file

delete_file
Destructive

Deletes a file from a repository by creating a commit, requiring owner, repo, path, blob SHA, and commit message.

Instructions

Delete a file in a repository via a commit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
shaYesBlob SHA of the file
pathYes
repoYesRepository name
ownerYesRepository owner (user or organization)
branchNo
messageYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and openWorldHint=true, so the safety profile is covered by structured data. The description's added value is the commit mechanism, which implies the operation is recorded in git history (recoverable in principle) and consumes a commit message, but it never says which branch is targeted or what permissions are required.

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?

One short sentence with no filler, and the resource and mechanism are front-loaded. It is appropriately sized for a tool whose safety details live in annotations, though the same brevity is what leaves parameters unexplained.

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?

For a destructive 6-parameter mutation with no output schema and half its parameters undescribed, the description is too thin: it omits branch targeting, default-branch behavior, the blob-SHA requirement, and any indication of what happens on success or failure.

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 50% (path, branch and message are undocumented), and 'via a commit' only loosely implies that a commit message is needed. The critical gotcha — that 'sha' must be the existing blob SHA of the file being removed, not a commit SHA — is not clarified by the description, so the coverage gap is not compensated.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb (delete) and resource (a file in a repository) and adds the mechanism ('via a commit'), so an agent understands this is a git-level commit operation, not a raw filesystem unlink. It does not, however, differentiate itself from siblings such as delete_branch or create_or_update_file, which is why it stops short of a 5.

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?

There is no when-to-use guidance, no statement of prerequisites (e.g. that you need an existing blob SHA from get_file_contents), and no named alternative such as create_or_update_file for update-vs-delete decisions. 'Via a commit' hints at context but stops well short of routing guidance.

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