Skip to main content
Glama

fx_read_file

Reads a file within the FiveM/RedM server root, returning its contents for safe resource and configuration inspection.

Instructions

Lê com segurança o conteúdo de um arquivo do servidor (dentro do serverRoot).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesCaminho relativo ao serverRoot (ex: "resources/[scripts]/meu_script/config.lua" ou "server.cfg")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose two meaningful traits: the read is non-mutating and the path is confined to serverRoot (implying path validation). It says nothing about behavior on missing/forbidden files, size limits, encoding, or return shape.

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?

A single front-loaded sentence with no wasted words; action and safety scope come first. Brevity here borders on under-specification, but nothing is padded.

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

Completeness3/5

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

For a one-parameter read tool this covers purpose and path confinement, which is the minimum viable. Since no output schema exists and no annotations are provided, the omission of return format and error behavior leaves a real gap.

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% and the schema already explains that 'path' is relative to serverRoot with examples. The description adds no syntax or format detail beyond that, so the baseline 3 applies.

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+resource ('Lê ... o conteúdo de um arquivo') and adds a scope constraint ('dentro do serverRoot'). This cleanly separates it from fx_write_file and fx_delete_file, though the description never names or routes to any sibling explicitly.

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?

No when-to-use guidance, no prerequisites, and no mention of alternatives such as fx_search_code for locating a file or fx_get_resource_info for resource metadata. The agent must infer that this is the tool for retrieving known file contents.

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