Skip to main content
Glama

Executar comando no console do FiveM

fivem_command

Runs FXServer console commands via txAdmin and returns the captured output, enabling resource ensure/restart, player kicks, and server variable changes.

Instructions

Executa um comando no console do FXServer e devolve o que o console imprimiu. Aceita qualquer comando do servidor. Para (re)carregar um resource use "ensure ": ele inicia o que está parado e reinicia o que está rodando, sem precisar saber o estado antes — "start" e "restart" só valem quando falhar em um dos dois casos é justamente o que você quer. Resource novo no disco ou manifest alterado pede "refresh" antes. Também aceita stop, say, kick, set/setr , etc. A captura fecha quando o console fica quieto; comandos que demoram para responder pedem timeoutMs maior.

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

Input Schema

NameRequiredDescriptionDefault
commandYesComando exatamente como se digitasse no console
quietMsNoSilêncio no console que encerra a captura (padrão 900)
timeoutMsNoTempo máximo de captura da saída (padrão 10000)
timestampsNoPrefixar cada bloco com o horário

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/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 well: it discloses that output capture ends when the console goes quiet, that the capture is bounded by a timeout, and that slow commands need a larger timeoutMs. It lists side-effecting commands (stop, kick, set/setr) but never flags that these mutate live server state or require console/admin privileges, which is the main remaining gap for a tool that accepts "qualquer comando do servidor".

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?

Content is front-loaded and dense with useful routing information, with no filler. The ensure sentence is somewhat convoluted in its phrasing about start/restart failure semantics, costing a bit of readability, but nothing is wasted.

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?

There is no output schema, and the description compensates by explaining what comes back (console output) and when capture terminates. For a four-parameter, arbitrary-command execution tool the coverage is close to sufficient, falling short only on privilege/risk disclosure and on how this differs from the adjacent console/log tools.

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 the baseline is 3, and the description only modestly exceeds it: "A captura fecha quando o console fica quieto" implicitly explains quietMs and "comandos que demoram para responder pedem timeoutMs maior" adds practical tuning advice for timeoutMs. It says nothing about the timestamps flag, so the added meaning is partial rather than substantial.

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?

The description opens with a concrete verb+resource pair ("Executa um comando no console do FXServer") and states the return ("devolve o que o console imprimiu"), so the core action is unmistakable. It does not, however, differentiate itself from siblings like fivem_console or fivem_logs, which appear to overlap in console-access territory.

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?

It gives explicit routing rules: use "ensure <resource>" for (re)loading because it works regardless of state, reserve "start"/"restart" for when failure in one of the two cases is desired, and run "refresh" first for new resources or changed manifests. That is when-to-use, when-not-to-use, and a prerequisite, all stated directly.

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