Skip to main content
Glama

Read a temporary Lua file

lua_file_read
Read-only

Read a Lua file from the game's lua/mcpagent_tmp/ directory and return its path and content; missing files report not_found.

Instructions

Reads a file of the game's lua/mcpagent_tmp/ folder. Result: {path, content}. 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_read"
  }
}

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
pathYes
contentYes
warningNo
next_callNo
answered_byNo
truncated_noteNo
version_warningNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.7

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds the concrete return shape '{path, content}' and the 'not_found' error condition, which is useful, but says nothing about size limits, encoding, or how the instance relay behaves beyond what the schema states.

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?

Three short fragments: purpose, return shape, error. Front-loaded, zero filler, and every clause conveys something an agent can act on.

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?

With an output schema present, the description needn't expand on return values, and it still flags the one error state an agent must handle. The only shortfall is that a remote-instance read is not mentioned at the behavioral level, though the schema covers it.

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%, including the relative-name semantics and the coordinator relay for 'instance', so the schema carries the burden. The description adds no parameter-level meaning beyond what is already structured, which is the correct baseline here.

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?

States a specific verb and resource ('Reads a file') plus the exact scope ('the game's lua/mcpagent_tmp/ folder'), which separates it from siblings like lua_file_write or lua_file_delete by name alone. It stops short of explicitly naming any alternative, so sibling differentiation is inferred from the tool names rather than stated.

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 implied by the scope: read files that live in the temp agent folder. There is no statement of when to prefer this over lua_exec_file or lua_file_list, and no prerequisites or exclusions are given.

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