Skip to main content
Glama

fx_write_file

Writes or modifies a FiveM/RedM server file, auto-creating a mirrored anti-collision backup before overwriting an existing file.

Instructions

Escreve ou modifica um arquivo do servidor. Se o arquivo já existir, um backup espelhado anti-colisão é criado automaticamente antes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesCaminho relativo ao serverRoot (ex: "resources/[scripts]/meu_script/config.lua")
contentYesConteúdo a ser gravado no arquivo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/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 and does disclose one important non-obvious behavior: an automatic mirrored anti-collision backup is created before overwriting an existing file. However, it says nothing about permissions, encoding, parent-directory creation, or what happens on failure, so the mutation profile is only partially covered.

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, and the core action is front-loaded ahead of the conditional backup caveat. Every clause carries information an agent does not get from structured fields.

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 two-parameter write tool with no annotations and no output schema, the description covers overwrite safety but leaves the agent guessing about encoding, directory creation, permission requirements, and return behavior. Adequate for invocation, incomplete for confident use.

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 both parameters (path relative to serverRoot, content) are already fully documented in the schema. The description adds no format, encoding, or path-resolution semantics beyond that, so the baseline of 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 and resource ("Escreve ou modifica um arquivo do servidor") that an agent can immediately match against siblings like fx_read_file or fx_delete_file. It does not explicitly name a sibling or boundary, but the create/modify scope is unambiguous.

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?

There is no explicit when-to-use guidance and no routing away from alternatives such as fx_create_resource or fx_manage_server_cfg, which could also produce files. The only contextual hint is that overwriting is tolerated because a backup is made, which implies usage rather than stating it.

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