Skip to main content
Glama

github_mcp.delete_file

Destructive

Delete a planned file from an isolated job workspace only after verifying its SHA-256 checksum, returning deletion status and invalidating previews and checks without affecting remote repositories.

Instructions

Remove a planned existing file from the isolated job workspace after verifying its checksum. Returns path and deleted status; invalidates preview and checks. Destructive locally, but does not commit or remove a remote file until separately authorized publication.

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": {
      "job_id": "<job_id>",
      "path": "<path>",
      "expected_checksum": "<expected_checksum>"
    },
    "name": "github_mcp.delete_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPlanned repository-relative file path to delete.
job_idYesExisting editable job identifier.
expected_checksumYesCurrent SHA-256 checksum from read_file for this job workspace.

Output Schema

NameRequiredDescriptionDefault
okYes
dataNo
messageNo
error_codeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.0.2
    • addedInput schema / properties / expected_checksum / description
      Added value: +"Current SHA-256 checksum from read_file for this job workspace."
    • addedInput schema / properties / job_id / description
      Added value: +"Existing editable job identifier."
    • addedInput schema / properties / path / description
      Added value: +"Planned repository-relative file path to delete."
  2. First observedv1.0.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and openWorldHint=false, so local destructiveness is known; the description adds real value on top by disclosing the checksum safety gate, the invalidation of preview/check state, and the hard boundary that nothing is committed remotely. It stops short of saying what happens when a checksum mismatches, which is the one behavior an agent most needs when the call fails.

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 sentences, zero filler, front-loaded with the operation and scope before the return value and the remote-vs-local caveat. Every clause carries information an agent would otherwise have to infer.

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

Completeness4/5

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

An output schema exists, so return values need not be spelled out, yet the description still notes path and deleted status. Given a destructive mutation with three required parameters, the main remaining gap is failure semantics on checksum mismatch and any authorization requirement for the subsequent publication step.

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 coverage is 100%, so all three parameters (job_id, path, expected_checksum) are already documented in the schema, including that the checksum comes from read_file. The description reinforces that verification is mandatory but adds no format, mismatch handling, or path-resolution detail beyond the schema. Baseline 3 applies.

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 ('Remove a planned existing file from the isolated job workspace') plus the gating condition (checksum verification), and immediately bounds the scope by saying it does not commit or remove a remote file. That boundary separates it cleanly from publication/commit siblings like create_file_commits or publish_branch without needing to name them.

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?

It conveys the prerequisite (a matching checksum, sourced via read_file per the schema) and the consequence that preview and checks are invalidated, which tells an agent when in the workflow this belongs. It also states the when-not case (remote removal requires separately authorized publication), though it doesn't explicitly point to the alternative tool for that case.

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