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
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | The folder to write it in (default out/packages) | |
| tag | Yes | ||
| name | No | Package name, default the tag; e.g. @acme/price-ticker | |
| title | No | ||
| license | No | MIT | |
| preview | No | Put light and dark covers in it (the settled last frame, from preview_component), shown on its card | |
| version | Yes | e.g. 1.0.0 | |
| description | No |