import_package
Imports a packed component (.mogapkg) from a file, URL, or base64 data into the project, verifies every hash, copies it under components//, and records it in moga.json.
Instructions
Import a component package (a .mogapkg from pack_component) into this project, from a file (path), a web address (url, https) or its bytes (data, base64). It is checked whole first (every file's hash and the package hash), copied into components// (as: another tag) and recorded in moga.json packages { name, version, hash }: the copy is the project's own, renders never read the package again, and nothing changes when the package is updated or taken down. The same content already here is left as it is (already); another version of the same package replaces one not changed here (replaced); a component changed here, or another one under that tag, needs as or replace. Use it like any project component afterwards (list_components, preview_component).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "import_package"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| as | No | Import under this tag instead of the one it was packed as | |
| url | No | https://…/<name>-<version>.mogapkg | |
| data | No | The file, base64 | |
| path | No | A .mogapkg file | |
| basis | No | What you read and followed to make this change, as refs from search or lookup: rule:<lint or taste rule>, taste, feedback:<id> (earlier feedback this follows; what it answers goes in feedback), commit:<id> (an earlier change it builds on), asset:, template:, skill:… The person sees them under the change, so they know why it is this way. Name only what shaped it. | |
| message | No | One line saying why, kept with the change in the history | |
| replace | No | Overwrite what is under the tag, changes made here included | |
| feedback | No | Ids of the feedback this change answers (notes and marks from list_notes, list_examples or the conversation). When the person keeps the change it joins the record of that feedback, and when they then mark the feedback resolved it is the fix; when they take it back, the feedback opens again. | |
| confidence | No | How sure you are this change is what the person wants. high: they asked for exactly this, or you measured it against a reference. medium: you inferred it from the taste, a rule or earlier feedback. low: you are guessing, or it changes something they did not ask about. The person's threshold decides which changes stand by themselves and which wait for them to keep; say it honestly on every change. |