Skip to main content
Glama

pack_component

Package a project component into a single importable .mogapkg file that builds independently, so you can reuse it in another project via import_package.

Instructions

Pack a project component (components//) into one package file anyone can import into another project with import_package: out/packages/-.mogapkg, or in the folder to. It must build on its own (its own files only, nothing from this project's node_modules). name defaults to the tag (an optional @scope/: @acme/price-ticker), version is major.minor.patch, title and description default to the schema's, license to MIT. The same folder always packs to the same bytes and hash. Returns the file and the manifest (name, version, hash, files).

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": {
      "tag": "<tag>",
      "version": "<version>"
    },
    "name": "pack_component"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoThe folder to write it in (default out/packages)
tagYes
nameNoPackage name, default the tag; e.g. @acme/price-ticker
titleNo
licenseNoMIT
previewNoPut light and dark covers in it (the settled last frame, from preview_component), shown on its card
versionYese.g. 1.0.0
descriptionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.2

TDQS

A4.3/5.0
Behavior4/5

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

With annotations already declaring openWorldHint=false, destructiveHint=false and a write (readOnlyHint=false), the description adds substantive behavior: the tool writes a file, is deterministic ('the same folder always packs to the same bytes and hash'), and returns both file and manifest contents. The determinism claim concerns output bytes rather than repeated-call effects, so it is not a contradiction of idempotentHint=false, though overwrite behavior when the target file already exists is never stated.

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?

Front-loaded with purpose and output path, then defaults, then determinism and return value — a sensible order with no filler sentences. It does restate several defaults that also appear in the schema (license MIT, `to` folder), which is mild duplication rather than waste.

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?

No output schema exists, and the description compensates by naming the return payload (file plus manifest with name, version, hash, files). For an 8-parameter write tool the preconditions, defaults, and output location are all covered; only the `preview`/cover-image behavior and existing-file overwrite semantics are left unaddressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

At 50% schema coverage the description carries real weight and does: it explains name defaults to the tag with an @scope/ form, version as major.minor.patch, title/description falling back to the schema's values, license defaulting to MIT, and `to` defaulting to out/packages. The two gaps are `tag` (only implied by the components/<tag>/ path) and `preview`, which the description never mentions even though the schema calls it out.

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?

States a specific verb and resource ('Pack a project component (components/<tag>/)') and names the exact artifact produced ('out/packages/<name>-<version>.mogapkg'), which cleanly separates it from sibling pack_project (whole project) and from import_package (the consumer of the artifact). An agent can pick this tool without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is clear from the framing: use this to ship a single component that another project will pull in via import_package. The 'must build on its own (its own files only, nothing from this project's node_modules)' line is a real precondition that guides correct use. It stops short of explicit exclusions (e.g. when to prefer pack_project or how to handle a component with external deps), so it is strong but not complete routing guidance.

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

Deploy Server

Other Tools