Repository navigation
Description
Summary
generate_manifest_tool only generates a manifest from scratch. It never reads an existing fxmanifest.lua, and it cannot emit exports, server_exports, provide, data_file or other common directives, although CLAUDE.md describes it as able to "Author or update" a manifest.
Where
mcp-server/tools/manifest_gen.py:20-128(generate_manifest)mcp-server/server.py:69-92(generate_manifest_toolsignature)CLAUDE.md:77templates/nui-vite/fxmanifest.lua:12-15(NUI layout the tool should be able to reproduce)
Details
- There is no mode that parses an existing manifest, preserves unknown directives and comments, and merges new scripts or dependencies.
- Supported inputs are name, game, language, framework, dependencies, scripts, NUI flag and workspace path. There is no way to declare
exports,server_exports,provide,data_file,escrow_ignore, or versioned dependency constraints. - The output is text only; users must hand-merge it with their existing manifest.
Bugs in the current generation path (missing commas, dropped shared scripts, hardcoded ui_page) are tracked in "generate_manifest emits Lua tables without commas, mishandles scanned scripts".
Impact
The common real task, "add these files / this dependency / this export to my manifest", is not supported, so agents either regenerate (losing custom directives) or edit by hand, which is what the tool is meant to avoid.
Suggested fix
- Add
mode: "create" | "update". In update mode, parse the existing manifest (reuse the parser proposed in "Add validate_manifest_tool backed by one validator shared with CI"), keep unknown directives and comments, merge new scripts and dependencies, and return a diff. - Accept
exportsandserver_exportslists (and optionallyprovide,data_file). - Update CLAUDE.md to describe the actual behaviour.
Acceptance criteria
- Update mode on an existing manifest adds a new client script and a dependency while preserving all other lines and comments.
-
exportsandserver_exportscan be emitted. - Update mode returns a diff of the change.
- CLAUDE.md matches the tool's capabilities.
Getting started
- Relevant files:
mcp-server/tools/manifest_gen.py,mcp-server/tools/manifest_common.py,mcp-server/server.py - How to run checks: there is no test suite yet; run the MCP server with
cd mcp-server && pip install -r requirements.txt && python server.py, and CI checks live in.github/workflows/validate.yml - Related docs:
skills/fxmanifest/SKILL.md, fxmanifest reference on docs.fivem.net
Filed by repo-audit/full-audit at 701824d. Severity: medium. Effort: M. audit-key: enhancement|mcp-server/tools/manifest_gen.py|update-mode
Activity
TMHSDigital commentedon Nov 21, 2026
Fixed in f68d2d0.
generate_manifest_tool now takes
exportsandserver_exports, andmode="update"reads workspace_path/fxmanifest.lua (using the validator's parser), appends single-entry directives (client_script, dependency, export, server_export, ...) only for entries not already declared, and returns a unified diff plus the full new content. Every existing line and comment is kept, and the file is never written. CLAUDE.md and the MCP server README describe this.Verified by tests: update mode adds a script, a dependency and a server export, skips ones already declared, preserves the original text byte for byte, and leaves the file untouched; error and no-change cases are covered.