Skip to main content
Glama

Package and Validate GMA Addon

package_and_validate
Idempotent

Validate 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

TableJSON Schema
NameRequiredDescriptionDefault
addon_dirNoRoot directory of the Garry's Mod addon to inspect and validate. Defaults to current workspace root if omitted.
build_gmaNoWhen 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_pathNoDestination file path for the compiled .gma file. Defaults to '<addon_dir>/out.gma' if build_gma is true and this is omitted.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesDomain-specific typed payload returned by the tool.
statusYesExecution status of the tool call ('success', 'partial', 'blocked', or 'failed').
summaryYesConcise, human-readable summary of operational findings, diagnostics, or execution outcome.
evidenceYesTraceability evidence including cited documentation and generated artifacts.
warningsYesList of non-fatal warnings, lint advisories, engine caveats, or security notices.
nextActionsNoActionable, ordered recommendations for the agent's immediate next steps.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / addon_dir / description
      Previous value: -"Root directory of addon (defaults to workspace)"New value: +"Root directory of the Garry's Mod addon to inspect and validate. Defaults to current workspace root if omitted."
    • changedInput schema / properties / build_gma / description
      Previous value: -"Compile .gma package if gmad is available"New value: +"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)."
    • changedInput schema / properties / output_gma_path / description
      Previous value: -"Destination path for .gma"New value: +"Destination file path for the compiled .gma file. Defaults to '<addon_dir>/out.gma' if build_gma is true and this is omitted."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "data": {
      +      "description": "Domain-specific typed payload returned by the tool.",
      +      "properties": {
      +        "addon_json_valid": {
      +          "description": "True if addon.json exists and strictly satisfies Workshop schema.",
      +          "type": "boolean"
      +        },
      +        "gma_path": {
      +          "description": "Destination path of the compiled .gma package if build_gma was true and successful.",
      +          "type": "string"
      +        },
      +        "illegal_files": {
      +          "description": "Files rejected by Steam Workshop gmad whitelist rules.",
      +          "items": {
      +            "properties": {
      +              "path": {
      +                "description": "Relative file path.",
      +                "type": "string"
      +              },
      +              "reason": {
      +                "description": "Reason for rejection (e.g. disallowed extension, binary payload).",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "path",
      +              "reason"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "total_files": {
      +          "description": "Total file count inspected in addon directory.",
      +          "type": "integer"
      +        },
      +        "total_size_bytes": {
      +          "description": "Total uncompressed size of all addon files in bytes.",
      +          "type": "integer"
      +        },
      +        "valid": {
      +          "description": "True if addon passes all Steam Workshop rules and contains no illegal files.",
      +          "type": "boolean"
      +        },
      +        "warnings": {
      +          "description": "Validation warnings such as uppercase filenames breaking Linux servers.",
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "valid",
      +        "addon_json_valid",
      +        "total_files",
      +        "total_size_bytes",
      +        "illegal_files",
      +        "warnings"
      +      ],
      +      "type": "object"
      +    },
      +    "evidence": {
      +      "description": "Traceability evidence including cited documentation and generated artifacts.",
      +      "properties": {
      +        "artifacts": {
      +          "description": "Files, packages, or manifests generated on disk or in memory.",
      +          "items": {
      +            "properties": {
      +              "label": {
      +                "description": "Descriptive label of the generated artifact.",
      +                "type": "string"
      +              },
      +              "sha256": {
      +                "description": "SHA-256 hash of the generated file.",
      +                "type": "string"
      +              },
      +              "uri": {
      +                "description": "File path or URI of the generated artifact.",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "label",
      +              "uri"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "inputsDigest": {
      +          "description": "SHA-256 digest of normalized tool inputs for auditability.",
      +          "type": "string"
      +        },
      +        "sources": {
      +          "description": "Cited documentation, wiki pages, or external web sources supporting the result.",
      +          "items": {
      +            "properties": {
      +              "label": {
      +                "description": "Display name or title of the cited resource.",
      +                "type": "string"
      +              },
      +              "retrievedAt": {
      +                "description": "ISO-8601 timestamp of source retrieval.",
      +                "type": "string"
      +              },
      +              "uri": {
      +                "description": "Canonical URI or URL of the documentation or source.",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "label"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "sources",
      +        "artifacts"
      +      ],
      +      "type": "object"
      +    },
      +    "nextActions": {
      +      "description": "Actionable, ordered recommendations for the agent's immediate next steps.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "status": {
      +      "description": "Execution status of the tool call ('success', 'partial', 'blocked', or 'failed').",
      +      "enum": [
      +        "success",
      +        "partial",
      +        "blocked",
      +        "failed"
      +      ],
      +      "type": "string"
      +    },
      +    "summary": {
      +      "description": "Concise, human-readable summary of operational findings, diagnostics, or execution outcome.",
      +      "type": "string"
      +    },
      +    "warnings": {
      +      "description": "List of non-fatal warnings, lint advisories, engine caveats, or security notices.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "summary",
      +    "data",
      +    "warnings",
      +    "evidence"
      +  ],
      +  "type": "object"
      +}
  2. First observedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

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

The description clearly discloses the conditional mutation behavior: '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.' It also surfaces the GMAD_PATH requirement and default output location, which goes beyond the annotations and gives an agent accurate expectations about side effects. This does not contradict the readOnlyHint=false or destructiveHint=false annotations.

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?

The description is long but information-dense, front-loading the core purpose before diving into optional compilation behavior and return envelope details. A little redundancy exists with schema content (e.g., 'Set build_gma to true (default false) to trigger .gma compilation'), but the overall structure is logically ordered and every section earns its place given the tool's dual validation/packaging nature.

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

Completeness5/5

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

The description covers what the tool validates, when to use it, when compilation is triggered, prerequisites, defaults, sibling alternatives, and the return envelope structure. Given the schema and annotations also present, an agent has everything needed to decide whether to call this tool and what to expect from it.

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 the baseline is 3. The description does restate parameter defaults and semantics, but the input schema already documents addon_dir, build_gma, and output_gma_path thoroughly. The description adds only mild extra context around the zero-illegal-files condition and external executable requirement, not enough to raise the score further.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb ('Verify') and a concrete resource ('a Garry's Mod addon directory') against official Steam Workshop and GMA packaging rules. It also explicitly scopes the optional compile behavior, making the tool's dual validation/packaging role unambiguous and distinguishable from siblings like lint_glua and scaffold_gmod_component.

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?

The description gives direct placement guidance: 'Use this tool as the final verification gate before uploading addons to the Steam Workshop or deploying to a dedicated server.' It also names sibling tools as alternatives for adjacent jobs ('Use scaffold_gmod_component to bootstrap addon structures, and lint_glua/audit_net_security to audit code quality prior to packaging'), making the selection boundary explicit.

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