Package and Validate GMA Addon
package_and_validateValidate a Garry's Mod addon directory against Steam Workshop and GMA packaging rules, flag illegal files and casing issues, then optionally compile a .gma archive.
Instructions
Verify a Garry's Mod addon directory against official Steam Workshop and GMA packaging rules (addon.json validation, file extension whitelist, path casing), with optional .gma archive compilation. Read-only validation by default; does NOT mutate files. If build_gma is true AND validation passes with zero illegal files, compiles a .gma binary package using the external gmad executable (requires GMAD_PATH environment variable) to output_gma_path (defaults to '/out.gma'). addon_dir specifies the root directory of the addon (defaults to workspace root). Set build_gma to true (default false) to trigger .gma compilation. Optional output_gma_path sets the target .gma binary path. Use this tool as the final verification gate before uploading addons to the Steam Workshop or deploying to a dedicated server. Checks addon.json structure, flags non-whitelisted files (e.g. .psd, .git, .exe), and warns on uppercase characters that cause 404s on Linux servers. Use scaffold_gmod_component to bootstrap addon structures, and lint_glua/audit_net_security to audit code quality prior to packaging. Returns a GModToolResult envelope with status ('success' or 'failed'), summary, and data containing valid (boolean), addon_json_valid (boolean), total_files, total_size_bytes, illegal_files array (path, rejection reason), warnings array (casing and metadata warnings), and optional gma_path.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| addon_dir | No | Root directory of the Garry's Mod addon to inspect and validate. Defaults to current workspace root if omitted. | |
| build_gma | No | When true and validation succeeds with 0 illegal files, invokes gmad to compile a .gma binary archive. Requires GMAD_PATH environment variable (default is false). | |
| output_gma_path | No | Destination file path for the compiled .gma file. Defaults to '<addon_dir>/out.gma' if build_gma is true and this is omitted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Domain-specific typed payload returned by the tool. | |
| status | Yes | Execution status of the tool call ('success', 'partial', 'blocked', or 'failed'). | |
| summary | Yes | Concise, human-readable summary of operational findings, diagnostics, or execution outcome. | |
| evidence | Yes | Traceability evidence including cited documentation and generated artifacts. | |
| warnings | Yes | List of non-fatal warnings, lint advisories, engine caveats, or security notices. | |
| nextActions | No | Actionable, ordered recommendations for the agent's immediate next steps. |