Skip to main content
Glama

Delete a temporary Lua file

lua_file_delete
Destructive

Deletes a specified Lua file from the game's lua/mcpagent_tmp/ folder while leaving any code it defined running. Returns deleted on success or not_found when missing.

Instructions

Deletes one file of the game's lua/mcpagent_tmp/ folder (code it defined keeps running). Result: {deleted}. Error not_found.

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": {
      "name": "<name>"
    },
    "name": "lua_file_delete"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesName relative to the lua/mcpagent_tmp/ directory (e.g. 'scan.lua', 'lib/util.lua').
instanceNoOptional. Instance identifier (see instances_list). If present and different from the local instance, the call is relayed by the coordinator to that instance.

Output Schema

NameRequiredDescriptionDefault
nextNo
noteNo
deletedYes
warningNo
next_callNo
answered_byNo
truncated_noteNo
version_warningNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.7

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and openWorldHint=false, so the bar is lower, yet the description still adds real behavioral context: deletion is scoped to a single file in a temp folder, and the defined code continues running (i.e., deleting the file is not an unload). It also surfaces the not_found error condition, which annotations cannot express.

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 compact sentences, front-loaded with the action and scope, followed by the side-effect clarification and the return/error contract. Nothing is padded or repeated from the title.

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?

For a single-parameter destructive delete with a full output schema and complete annotation coverage, the description supplies the essential scope and side-effect facts. It stops short of stating whether the file must exist beforehand or how missing-path vs missing-file errors differ, but nothing critical for correct invocation is absent.

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 both the `name` path-relative example and the `instance` relay header are already documented in the schema. The description adds no further meaning about either parameter, so the 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 (deletes) and resource (one file in the game's lua/mcpagent_tmp/ folder), with the scope restriction that only that sandbox directory is affected. The parenthetical 'code it defined keeps running' immediately separates this from any notion of unloading/reloading code, which is exactly the confusion a sibling like lua_reload could cause.

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

Usage Guidelines3/5

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

Usage is only implied: an agent can infer this is for cleaning up temporary Lua files, but there is no explicit statement of when to call it versus lua_file_write or lua_reload, and no prerequisites. No when-not guidance is given.

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