Skip to main content
Glama

Session Delete File

session_delete_file
DestructiveIdempotent

Reduce a session workspace's artifact count by deleting a single file, restoring access when the CODECALC_MAX_ARTIFACT_COUNT limit is exceeded.

Instructions

Delete one file (or symlink entry — never the directory or symlink's target) from a session workspace. This is the recovery path when a session is refused for being over CODECALC_MAX_ARTIFACT_COUNT: neither session_write_file (creates/overwrites, never removes) nor session_run/ execute_code (refused by the same cap) can shrink the count, so this is the only in-session way to get back under it short of session_stop discarding the whole workspace. Refuses runner-internal paths (the same ones session_artifacts excludes) and directories.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesRelative path inside the workspace to delete; path escapes (e.g. '../') are refused
session_idYesId of the session workspace to delete from

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.13.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already mark this as destructive and idempotent, but the description adds valuable behavioral nuance: it only deletes the file or symlink entry, never the directory or symlink target, and refuses runner-internal paths. This goes beyond the binary annotation hints and clarifies safety boundaries.

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 dense but every sentence carries necessary information: scope, purpose, alternatives, and restrictions. It is front-loaded with the core action and then provides context in a logical order, with no filler or repetition of schema content.

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

Completeness5/5

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

For a two-parameter deletion tool with a well-documented schema, output schema, and good annotations, the description covers everything needed: what it deletes, when to use it, why alternatives fail, and what it refuses. Nothing essential is missing.

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 100%, so the schema already documents both parameters. The description adds contextual constraints like refusing directories and protecting symlink targets, which indirectly clarifies path semantics, but it does not need to add much because the schema already covers parameter meaning.

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 states a precise verb and resource: 'Delete one file (or symlink entry — never the directory or symlink's target) from a session workspace.' It clearly distinguishes its scope from write, run, and stop operations by naming them, making the tool's unique role immediately obvious.

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

Usage Guidelines5/5

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

The description gives explicit when-to-use guidance: it is the recovery path when a session exceeds CODECALC_MAX_ARTIFACT_COUNT, and it explains why alternatives session_write_file and session_run/execute_code cannot help. It also states exclusions (runner-internal paths and directories), leaving no ambiguity about when the tool applies.

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